Part Number Hot Search : 
3216S FAL11 AAT4615 TBH0201B SS12L1 C74HC3 MAX97 AMS1505V
Product Description
Full Text Search
 

To Download MC68HC11C0MFN2 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  order this document by mc68hc11c0ts/d ?motorola inc., 1996 this document contains information on a new product. speci?ations and information herein are subject to change without notice. motorola semiconductor technical data mc68hc11c0 technical summary 8-bit microcontroller 1 introduction the mc68hc11c0 high-performance microcontroller unit (mcu) is an enhanced member of the m68hc11 family of microcontrollers. excluding its new features, the mc68hc11c0 is very similar to the mc68hc11e9 mcu. this device incorporates highly sophisticated on-chip peripheral functions and, with a multiplexed expanded bus, is characterized by high speed and low power consumption. its fully static design allows this device to operate at frequencies from 3 mhz to dc. the mc68hc11c0 has the ability to extend the address range of the m68hc11 cpu beyond the 64- kbyte limit of the 16 cpu address lines. the extra addressing capability is provided by a register-based paging scheme using two additional expansion address lines and the 64 kbytes of cpu address space. six chip-select signals are provided to simplify the interface to external peripheral devices. two 8-bit pulse-width modulation timer outputs have been added to the timer system. the two outputs have selectable polarity, duty cycle, and period. they can be concatenated to form a single 16-bit out- put. in addition to the irq and xirq pins found on other m68hc11 devices, seven more interrupt request lines have been added, creating a total of one nonmaskable and eight maskable interrupt sources. re- fer to the mc68hc11c0 block diagram. table 1 device ordering information package description config frequency temperature mc order number 64-pin qfp no rom $00 2 mhz ?0 to + 85 c mc68hc11c0cfu2 ?0 to + 105 c mc68hc11c0vfu2 ?0 to + 125 c mc68hc11c0mfu2 3 mhz 0 to + 70 c mc68hc11c0fu3 ?0 to + 85 c mc68hc11c0cfu3 68-pin plcc no rom $00 2 mhz ?0 to + 85 c mc68hc11c0cfn2 ?0 to + 105 c mc68hc11c0vfn2 ?0 to + 125 c MC68HC11C0MFN2 3 mhz 0 to + 70 c mc68hc11c0fn3 ?0 to + 85 c mc68hc11c0cfn3 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 2 mc68hc11c0ts/d 1.1 features ?m68hc11 cpu ?256 bytes of on-chip static ram ?1024 bytes of bootstrap rom (available in single-chip, bootstrap, and special-test modes) ?power saving stop and wait modes ?64 kbyte address space, expandable to 256 kbytes using on-chip memory mapping logic ?multiplexed address/data bus ?16-bit timer system ?three input capture (ic) channels ?four output compare (oc) channels ?one additional channel, software selectable as fourth ic or fifth oc ?8-bit pulse accumulator ?real-time interrupt circuit ?computer operating properly (cop) watchdog timer ?clock monitor ?five external general-purpose chip select signals, each with programmable clock stretching ?one external vector/program chip select with programmable clock stretching ?nine external interrupt request inputs (one nonmaskable interrupt) ?two 8-bit pulse-width modulation (pwm) timer channels (concatenate for a single 16-bit pwm) ?four-channel 8-bit analog-to-digital (a/d) converter ?asynchronous nonreturn to zero (nrz) serial communications interface (sci) ?synchronous serial peripheral interface (spi) ?six input/output (i/o) ports (35 pins) ?31 bidirectional ?4 input only ?all bidirectional port pins have selectable internal pull-up devices ?available in 68-pin plastic leaded chip carrier (plcc) and 64-pin quad flat pack (qfp) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 3 figure 1 pin assignments for 64-pin quad flat pack 14 15 1 2 3 4 5 6 7 8 9 33 47 46 45 44 43 42 41 40 39 38 10 11 12 13 37 36 35 34 16 48 pg6/gpcs4 pg7/gpcs5 addr8 addr9 addr10 addr11 addr12 addr13 addr14 addr15 pg1/xa16 pg0/csv/csprog pg2/xa17 pg3/gpcs1 pg4/gpcs2 pg5/gpcs3 addr2/data2 addr5/data5 addr4/data4 addr3/data3 addr1/data1 addr0/data0 pd0/rxd pf0/irq0 pf1/irq1 pf2/irq2 pf3/irq3 pf4/irq4 pf5/irq5 pf6/irq6 addr7/data7 addr6/data6 61 60 59 58 57 54 55 52 51 50 49 63 62 53 64 pa5/oc3/oc1 pa7/pai pa6/oc2/oc1 pa0/ic3 pa3/oc5/ic4/oc1 pa2/ic1 v ss pa4/oc4/oc1 pa1/ic2 pd5/ss /irq pd4/sck pd3/mosi pd2/miso/xirq pd1/txd v dd modb/lir 24 25 26 27 28 29 17 18 19 20 21 22 23 30 31 32 pe0/an0 v rl pe1/an1 v rh pe3/an3 pe2/an2 v ssi as reset ph1/pw2 ph0/pw1 v ddi e /rd r/w /wr extal xtal 56 mc68hc11c0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 4 mc68hc11c0ts/d figure 2 pin assignments for 68-pin plcc pa5/oc3/oc1 pa7/pai pa6/oc2/oc1 pa0/ic3 pa3/oc5/ic4/oc1 pa2/ic1 v ss pa4/oc4/oc1 pa1/ic2 pd5/ss /irq pd4/sck pd3/mosi pd2/miso/xirq pd1/txd v dd modb/lir 23 24 10 11 12 13 14 15 16 17 18 45 59 58 57 56 55 54 53 52 51 50 19 20 21 22 49 48 47 46 25 60 pg6/gpcs4 pg7/gpcs5 addr8 addr9 addr10 addr11 addr12 addr13 addr14 addr15 pg1/xa16 pg0/csv/csprog pg2/xa17 pg3/gpcs1 pg4/gpcs2 pg5/gpcs3 addr3/data3 addr6/data6 addr5/data5 addr4/data4 addr2/data2 addr1/data1 nc pd0/rxd pf0/irq0 pf1/irq1 pf2/irq2 pf3/irq3 pf4/irq4 pf5/irq5 pf6/irq6 addr7/data7 6 5 4 3 2 67 68 65 64 63 62 8 7 66 9 34 35 36 37 38 39 27 28 29 30 31 32 33 40 41 42 pe0/an0 v rl pe1/an1 v rh pe3/an3 pe2/an2 v ssi as reset ph1/pw2 ph0/pw1 v ddi e /rd r/w /wr extal nc mc68hc11c0 61 44 addr0/data0 nc 26 xtal 43 1 nc f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 5 figure 3 mc68hc11c0 block diagram cop periodic spi sci memory expansion port e an0 an1 an2 an3 a/d converter mode control pwm timer system cpu v rl v rh pe0/an0 pe1/an1 pe2/an2 pe3/an3 port g ddr port g pg2/xa17 pg0/csv/csprog pg1/xa16 pg3/gpcs1 pg4/gpcs2 pg5/gpcs3 pg6/gpcs4 pg7/gpcs5 pd0 pd1 pd2 pd3 pd4 pd5 port d ddr/dioctl port d miso/xirq mosi sck ss /irq rxd txd modb/lir 256 bytes ram 1024 bytes boot rom interrupt pulse accumulator pa0 port a ddr pa1 pa2 pa3 pa4 pa5 pa6 pa7 ic3 ic2 ic1 oc5/ic4/oc1 oc4/oc1 oc3/oc1 oc2/oc1 pai oscillator interrupt logic clock logic addr0/data0 addr1/data1 addr2/data2 addr3/data3 addr4/data4 addr5/data5 addr6/data6 addr7/data7 addr8 addr9 addr10 addr11 addr12 addr13 addr14 addr15 port a ph0/pw1 ph1/pw2 reset xtal extal as port h ddrh port f irq [6:0 ] pf1/irq1 pf2/irq2 pf3/irq3 pf4/irq4 port f ddr pf5/irq5 pf6/irq6 pf0/irq0 v dd v ss chip selects r/w /wr e /rd high order address low order address/data f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
section page motorola mc68hc11c0 6 mc68hc11c0ts/d 1 introduction 1 1.1 features ...................................................................................................................................... 2 2 operating modes 7 2.1 expanded mode .......................................................................................................................... 7 2.2 single-chip mode ........................................................................................................................ 8 2.3 bootstrap mode ........................................................................................................................... 8 2.4 special test mode ....................................................................................................................... 9 2.5 mode selection ............................................................................................................................ 9 3 on-chip memory 11 3.1 memory map and register block .............................................................................................. 11 3.2 ram .......................................................................................................................................... 16 3.3 bootstrap rom .......................................................................................................................... 17 4 memory expansion and chip selects 18 4.1 memory expansion .................................................................................................................... 18 4.2 chip selects .............................................................................................................................. 22 5 parallel input/output 27 6 resets and interrupts 36 6.1 external interrupt requests ....................................................................................................... 40 7 main timer 41 8 pulse accumulator 49 9 pulse-width modulation timer 52 9.1 pwm boundary cases .............................................................................................................. 56 10 serial subsystems 57 10.1 serial communications interface (sci) ..................................................................................... 59 10.2 serial peripheral interface (spi) ................................................................................................ 67 11 analog-to-digital converter 71 table of contents f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 7 2 operating modes the mc68hc11c0 has four modes of operation. these modes directly affect the address space and the memory map differs for each of them. refer to the memory map diagram and the following para- graphs. 2.1 expanded mode in expanded mode, the mcu can access the full 64-kbyte address space. the space includes the same on-chip memory addresses used for single-chip mode as well as addresses for external peripherals and memory devices. the 256-byte block of ram is accessible in expanded mode but is disabled after re- set. to enable ram in expanded mode, set the ramon bit in the config register. vectors are fetched from external locations $ffc0?ffff. the expansion bus consists of sixteen address lines (ad- dr[15:0]) and eight data lines (data[7:0]). the read/write (r/w ), read (rd ), write (wr ) and address strobe (as) signals are outputs that reflect the state of the internal data bus and are used to control the direction of data on the data bus. the low-order address lines and the 8-bit data bus are time multi- plexed on the same pins. during the first half of each bus cycle address information is present. during the second half of each bus cycle the pins become the bidirectional data bus. as is an active-high latch enable signal for an external address latch. address information is allowed through the transparent latch while as is high and is latched when as drives low. the address, r/w , and as signals are active and valid for all bus cycles, including accesses to internal memory locations. the e-clock signal (e ) is used to enable external devices to drive data onto the internal data bus during the second half of a read bus cycle (e clock low). unlike other m68hc11 devices, the mc68hc11c0 inverts the e clock signal before driving it out of the chip. r/w controls the direction of data transfers. r/w drives low when data is being written to the data bus. r/w will remain low during consecutive data bus write cycles, such as when a double-byte store occurs. notice that the write enable signal for an external memory is the nand of the inverted e clock and the inverted r/w signal. refer to the example diagram of address and data demul- tiplexing. a more efficient method of controlling data on the bus can be employed by use of the rd and the wr signals. setting the rwmc bit in the config register causes the rd and the wr signals to be driven out of the chip instead of e and r/w . rd asserts while a data bus read cycle is in progress. wr asserts while a data bus write cycle is in progress. in single-chip and expanded modes (smod = 0), config can only be written once. in special test modes (smod = 1), config can be written any time. changes do not take effect until the first cycle of the instruction following the write to config. bits [7:6] ?not implemented always read zero rwmc ?read/write strobe mode control 0 = r/w is driven out of the chip 1 = rd and wr are driven out of the chip bits [4:3] ?not implemented always read zero nocop ?cop watchdog timer disable refer to 6 resets and interrupts . config ?system configuration register $003f bit 7 654321 bit 0 rwmc nocop ramon reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 8 mc68hc11c0ts/d ramon ?ram enable refer to 3 on-chip memory . bit 0 ?not implemented always reads zero figure 4 address/data demultiplexing 2.2 single-chip mode in single-chip operating mode, the mc68hc11c0 is a stand-alone microcontroller with no external ad- dress or data bus. external address and data lines are disabled. bootloader rom appears in the mem- ory map at locations $bc00?bfff and $fc00?ffff. since there is no external address or data bus, the user must make certain that the ram contains valid code before entering single-chip mode. the register block is initially located at $0000 and can be remapped to any 1-kbyte boundary. ram is initially located at $0400?04ff and can be remapped to any 1-kbyte boundary. vectors are fetched internally from locations $ffc0?ffff. refer to the memory map diagram. 2.3 bootstrap mode bootstrap mode allows special-purpose programs to be entered into internal ram. this mode is entered by resetting to special test mode and then clearing the mda bit in hprio register. when this mode is selected, a 1024-byte bootstrap rom becomes present in the memory map. reset and interrupt vectors addr15 addr14 addr13 addr12 addr11 addr10 addr9 addr8 addr7/data7 addr6/data6 addr5/data5 addr4/data4 addr3/data3 addr2/data2 addr1/data1 addr0/data0 data1 data2 data3 data4 data5 data6 data7 data8 le q1 q2 q3 q4 q5 q6 q7 q8 q0 addr7 addr6 addr5 addr4 addr3 addr2 addr1 addr0 r/w /wr e /rd we addr15 addr14 addr13 addr12 addr11 addr10 addr9 addr8 mc54/74hc373 data7 data6 data5 data4 data3 data2 data1 data0 as mc68hc11c0 note: use of the rd and wr signals instead of e and r/w will eliminate the need for the external inverters and nand gate. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 9 are located in internal ram at locations $04c4?04fd. the bootstrap rom contains a small program which initializes the sci and allows the user to download a program of up to 256 bytes into on-chip ram. the program must begin at $0400. after an idle time of four-characters, or after receiving the character for address $04ff, control passes to the loaded program at $0400. refer to the memory map diagram. 2.4 special test mode special test mode is similar to expanded mode and is used primarily for production testing. the 1024- byte bootstrap rom is enabled and present at locations $fc00?ffff. in this operating mode, vectors are fetched from external locations $bfc0?bfff. 2.5 mode selection although it is intended primarily for operation in expanded mode, the mc68hc11c0 has four possible operating modes. the mc68hc11c0 can be reset to either expanded mode or special-test mode. the initial operating mode is determined by the logic level present on the modb pin during reset. after reset, the operating mode may be changed according to the table contained in the following description of the hprio register. the function of internal read visibility/not e is determined by the state of the irvne bit and the mode selected. when enabled, internal read visibility (irv) causes the data from internal reads to be driven out the data bus. the user must be cautioned that even though the r/w line suggests that the data bus is in a high-impedance state, data will be driven out each time an internal read occurs. the not e clock (ne) function of this bit determines whether the e clock is on or off. refer to the description of irvne in the opt2 register. *the reset value of smod depends on the logic level present on the modb pin at the rising edge of reset. rboot ?read bootstrap rom valid only when smod is set (bootstrap or special test mode). resets to logic one in bootstrap mode only. can only be written in special modes. 0 = bootloader rom disabled and not in map 1 = bootloader rom enabled and in map at $be00?bfff smod and mda ?special mode select and mode select a the initial value of smod is the inverse of the logic level present on the modb pin at the rising edge of reset. the reset value of mda is one. the value of mda determines which operating mode is selected after reset. these two bits can be read at any time. they can be written anytime in test modes (smod = 1). mda can only be written once in normal modes. smod cannot be set once it has been cleared. hprio ?highest priority i-bit interrupt and miscellaneous $003c bit 7 654321 bit 0 rboot smod* mda psel3 psel2 psel1 psel0 reset: 0 100101 logic level of modb pin at reset value of smod latched at reset programmed value of mda mode selected 1 0 1 expanded 0 1 1 special test 1 0 0 single chip 0 1 0 bootstrap f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 10 mc68hc11c0ts/d bit 4 ?not implemented always reads zero psel[3:0] ?priority select bits [3:0] refer to 6 resets and interrupts . bits [7:5] ?not implemented always read zero irvne ?internal read visibility/not e irvne can be written once in any mode. in expanded and special-test modes, irvne determines whether irv is on or off. in special test mode, irvne is reset to one. in all other modes, irvne is reset to zero. 0 = no internal read visibility on external bus 1 = data from internal reads is driven out the external data bus. in single-chip and bootstrap modes this bit determines whether the e clock drives out from the chip. 0 = e is driven out from the chip. 1 = e pin is driven low. refer to the following table. bits [3:0] ?not implemented always read zero opt2 ?system configuration options 2 $0038 bit 7 654321 bit 0 irvne reset: 0 0000000 mode irvne out of reset e clock out of reset irv out of reset irvne affects only irvne can be written expanded 0 on off irv once special test 1 on on irv once single chip 0 on off e once bootstrap 0 on off e once f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 11 3 on-chip memory the mc68hc11c0 has 256 bytes of ram. a 1024-byte block of bootstrap rom is present in single- chip, bootstrap, and test modes. the following paragraphs describe the memory systems of this mcu. 3.1 memory map and register block the init register control the location of the registers in the 64-kbyte cpu address space. the 128-byte register block originates at $0000 after reset and can be placed at any 1-kbyte boundary by writing an appropriate value to the init register. the init register can be written only in the first 64 cycles after reset. if the register block and ram are placed at the same 1-kbyte boundary, the first 128 bytes of ram are inaccessible. this is due to an on-chip hardware priority scheme which eliminates conflicts which could arise from multiple resources sharing address locations. refer to the memory map dia- gram. can be written only once in first 64 cycles in expanded and single-chip modes or at any time in other modes. reg[15:10] ?internal register map position these bits determine the upper six bits of the register block address. at reset registers are mapped to $0000?007f. refer to the memory map diagram. init ?register mapping $003d bit 7 654321 bit 0 reg15 reg14 reg13 reg12 reg11 reg10 reset: 0 0000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 12 mc68hc11c0ts/d figure 5 mc68hc11c0 memory map 0400 04ff 256 bytes ram 0400 04ff ext expanded ext fc00 ffff bootstrap special test single chip ffff ffc0 ext 3ffff 10000 bc00 bfff ffff 10000 0000 (disabled after reset, can be remapped to any 1-kbyte boundary) expanded mode vectors (external) external expansion address locations ffff ffc0 expanded mode vectors (external) ffff ffc0 ffff ffc0 007f 0000 128 byte register block (can be remapped to any 1 kbyte boundary) 256 bytes ram (can be remapped to any 1 kbyte boundary) ffff ffc0 bootstrap mode vectors (internal) 1024 bytes bootstrap rom (internal) special test mode vectors (external) 1024 bytes bootstrap rom (internal) single chip vectors (internal) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 13 table 2 mc68hc11c0 register and control bit assignments the register block begins at $0000 out of reset and can be remapped to any 1k boundary. bit 7 654321 bit 0 $0000 pa7 pa6 pa5 pa4 pa3 pa2 pa1 pa0 porta $0001 dda7 dda6 dda5 dda4 dda3 dda2 dda1 dda0 ddra $0002 0 pf6 pf5 pf4 pf3 pf2 pf1 pf0 portf $0003 0 ddf6 ddf5 ddf4 ddf3 ddf2 ddf1 ddf0 ddrf $0004 is7 is6 is5 is4 is3 is2 is1 is0 fistat $0005 0 ie6 ie5 ie4 ie3 ie2 ie1 ie0 finten $0006 reserved $0007 0 0 dio5 dio4 dio3 dio2 dio1 dio0 dioctl $0008 0 0 pd5 pd4 pd3 pd2 pd1 pd0 portd $0009 0 0 ddd5 ddd4 ddd3 ddd2 ddd1 ddd0 ddrd $000a 0000pe3pe2pe1pe0 porte $000b foc1 foc2 foc3 foc4 foc5 0 0 0 cforc $000c oc1m7 oc1m6 oc1m5 oc1m4 oc1m3 0 0 0 oc1m $000d oc1d7 oc1d6 oc1d5 oc1d4 oc1d3 0 0 0 oc1d $000e bit 15 14 13 12 11 10 9 bit 8 tcnt (high) $000f bit 7 654321 bit 0 tcnt (low) $0010 bit 15 14 13 12 11 10 9 bit 8 tic1 (high) $0011 bit 7 654321 bit 0 tic1 (low) $0012 bit 15 14 13 12 11 10 9 bit 8 tic2 (high) $0013 bit 7 654321 bit 0 tic2 (low) $0014 bit 15 14 13 12 11 10 9 bit 8 tic3 (high) $0015 bit 7 654321 bit 0 tic3 (low) $0016 bit 15 14 13 12 11 10 9 bit 8 toc1(high) $0017 bit 7 654321 bit 0 toc1 (low) $0018 bit 15 14 13 12 11 10 9 bit 8 toc2 (high) $0019 bit 7 654321 bit 0 toc2 (low) $001a bit 15 14 13 12 11 10 9 bit 8 toc3 (high) $001b bit 7 654321 bit 0 toc3 (low) $001c bit 15 14 13 12 11 10 9 bit 8 toc4 (high) $001d bit 7 654321 bit 0 toc4 (low) $001e bit 15 14 13 12 11 10 9 bit 8 ti4/o5 (high) $001f bit 7 654321 bit 0 ti4/o5 (low) $0020 om2 ol2 om3 ol3 om4 ol4 om5 ol5 tctl1 $0021 edg4b edg4a edg1b edg1a edg2b edg2a edg3b edg3a tctl2 $0022 oc1i oc2i oc3i oc4i i4/o5i ic1i ic2i ic3i tmsk1 $0023 oc1f oc2f oc3f oc4f i4/o5f ic1f ic2f ic3f tflg1 $0024 toi rtii paovi paii 0 0 pr1 pr0 tmsk2 $0025 tof rtif paovf paif 0000 tflg2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 14 mc68hc11c0ts/d $0026 0 paen pamod pedge 0 i4/o5 rtr1 rtr0 pactl $0027 bit 7 654321 bit 0 pacnt $0028 spie spe 0 mstr cpol cpha spr1 spr0 spcr $0029 spif wcol 0 modf 0000 spsr $002a bit 7 654321 bit 0 spdr $002b tclr 0 scp1 scp0 rckb scr2 scr1 scr0 baud $002c r8 t8 0 m wake 0 0 0 sccr1 $002d tie tcie rie ilie te re rwu sbk sccr2 $002e tdre tc rdrf idle or nf fe 0 scsr $002f r7/t7 r6/t6 r5/t5 r4/t4 r3/t3 r2/t2 r1/t1 r0/t0 scdr $0030 ccf 0 scan mult cd cc cb ca adctl $0031 bit 7 654321 bit 0 adr1 $0032 bit 7 654321 bit 0 adr2 $0033 bit 7 654321 bit 0 adr3 $0034 bit 7 654321 bit 0 adr4 $0035 reserved $0036 reserved $0037 ram15 ram14 ram13 ram12 ram11 ram10 0 0 init2 $0038 0 0 0 irvne 0000 opt2 $0039 adpu csel irqe dly cme 0 cr1 cr0 option $003a bit 7 654321 bit 0 coprst $003b reserved $003c rboot smod mda 0 psel3 psel2 psel1 psel0 hprio $003d reg15 reg14 reg13 reg12 reg11 reg10 0 0 init $003e tilop 0 occr cbyp disr fcm fcop tcon test1 $003f 0 0 rwmc 0 0 nocop ramon 0 config $0040 va15 va14 va13 va12 va11 va10 0 0 vcsadr $0041 reserved $0042 psa15 psa14 psa13 psa12 psa11 psa10 pstha psthb pgsadr $0043 pea15 pea14 pea13 pea12 pea11 pea10 0 0 pgeadr $0044 000000 xa17 xa16 mxhadr $0045 xa15 xa14 xa13 xa12 xa11 xa10 0 0 mxladr $0046 gs1a15 gs1a14 gs1a13 gs1a12 gs1a11 gs1a10 g1stha g1sthb gp1sadr $0047 ge1a15 ge1a14 ge1a13 ge1a12 ge1a11 ge1a10 0 0 gp1eadr $0048 gs2a15 gs2a14 gs2a13 gs2a12 gs2a11 gs2a10 g2stha g2sthb gp2sadr $0049 ge2a15 ge2a14 ge2a13 ge2a12 ge2a11 ge2a10 0 0 gp2eadr $004a gs3a15 gs3a14 gs3a13 gs3a12 gs3a11 gs3a10 g3stha g3sthb gp3sadr $004b ge3a15 ge3a14 ge3a13 ge3a12 ge3a11 ge3a10 0 0 gp3eadr table 2 mc68hc11c0 register and control bit assignments (continued) the register block begins at $0000 out of reset and can be remapped to any 1k boundary. bit 7 654321 bit 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 15 $004c gs4a15 gs4a14 gs4a13 gs4a12 gs4a11 gs4a10 g4stha g4sthb gp4sadr $004d ge4a15 ge4a14 ge4a13 ge4a12 ge4a11 ge4a10 0 0 gp4eadr $004e gs5a15 gs5a14 gs5a13 gs5a12 gs5a11 gs5a10 g5stha g5sthb gp5sadr $004f ge5a15 ge5a14 ge5a13 ge5a12 ge5a11 ge5a10 0 0 gp5eadr $0050 reserved $0051 reserved $0052 reserved $0053 reserved $0054 reserved $0055 reserved $0056 reserved $0057 reserved $0058 reserved $0059 reserved $005a reserved $005b reserved $005c reserved $005d reserved $005e reserved $005f reserved $0060 0 con12 0 0 0 pcka3 pcka2 pcka1 pwclk $0061 0 0 pclk2 pclk1 0 0 ppol2 ppol1 pwpol $0062 bit 7 654321 bit 0 pwscal $0063 tpwsl discp 0000 pwen2 pwen1 pwen $0064 reserved $0065 reserved $0066 bit 7 654321 bit 0 pwcnt1 $0067 bit 7 654321 bit 0 pwcnt2 $0068 reserved $0069 reserved $006a bit 7 654321 bit 0 pwper1 $006b bit 7 654321 bit 0 pwper2 $006c reserved $006d reserved $006e bit 7 654321 bit 0 pwdty1 $006f bit 7 654321 bit 0 pwdty2 $0070 hppue gppue fppue 0 dppue 0 0 appue ppar $0071 pgen7 pgen6 pgen5 pgen4 pgen3 mem1 mem0 pgen0 pgen table 2 mc68hc11c0 register and control bit assignments (continued) the register block begins at $0000 out of reset and can be remapped to any 1k boundary. bit 7 654321 bit 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 16 mc68hc11c0ts/d 3.2 ram in expanded mode, ram is disabled after reset. in single-chip, bootstrap, and special test modes ram is enabled and present at locations $0400?04ff. the ram can be mapped to any 1-kbyte boundary by writing an appropriate value to the init2 register. the init2 register must be written during the first 64 cycles after reset in expanded and single-chip modes. if ram and the register block are placed at the same 1-kbyte boundary, the first 128 bytes of ram are inaccessible. this is due to an on-chip hard- ware priority scheme which eliminates conflicts which could arise from multiple resources sharing ad- dress locations. refer to the memory map diagram. can be written anytime in first 64 cycles in expanded or single-chip modes or at any time in other modes. ram[15:10] ?internal ram map position these bits determine the upper six bits of the ram address. at reset ram is mapped to $0400?04ff. refer to the memory map diagram. in single-chip and expanded modes (smod = 0), config can only be written once. in special test and bootstrap modes (smod = 1), config can be written any time. changes do not take effect until the first cycle of the instruction following the write to config. $0072 reserved $0073 reserved $0074 reserved $0075 0 0 dod5 dod4 dod3 dod2 dod1 dod0 dodm $0076 reserved $0077 reserved $0078 reserved $0079 reserved $007a reserved $007b reserved $007c 000000ph1ph0 porth $007d 000000 ddh1 ddh0 ddrh $007e pg7 pg6 pg5 pg4 pg3 pg2 pg1 pg0 portg $007f ddg7 ddg6 ddg5 ddg3 ddg3 ddg2 ddg1 ddg0 ddrg init2 ?ram mapping $0037 bit 7 654321 bit 0 ram15 ram14 ram13 ram12 ram11 ram10 reset: 00000100 config ?system configuration register $003f bit 7 654321 bit 0 rwmc nocop ramon reset: 00000100 table 2 mc68hc11c0 register and control bit assignments (continued) the register block begins at $0000 out of reset and can be remapped to any 1k boundary. bit 7 654321 bit 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 17 bits [7:6] ?not implemented always read zero rwmc ?read/write mode strobe mode control refer to 2 operating modes . bits [4:3] ?not implemented always read zero nocop ?cop watchdog timer disable refer to 6 resets and interrupts . ramon ?ram enable in all modes except expanded mode, ramon is forced to one out of reset. 0 = 256 bytes of ram present in the memory map 1 = 256 bytes of ram removed from the memory map and powered off bit 0 ?not implemented always reads zero 3.3 bootstrap rom when operating in expanded mode, the bootstrap rom is disabled and removed from the memory map. in bootstrap and special test modes, bootstrap rom is present at $fc00?ffff. in single-chip mode the bootstrap rom appears at locations $fc00?ffff and $bc00?bfff. bootstrap rom cannot be remapped to other locations. the bootstrap rom contains a small program that allows program code to be downloaded into on-chip ram. when the mc68hc11c0 enters bootstrap mode, bootloader firmware residing in bootstrap rom begins the downloading procedure by initializing the sci system and transmitting a break out the sci txd pin. the sci then waits for the first character to be received. after the first character is received on the rxd pin of the sci, bootloader firmware begins counting the number of bytes received. when an idle time of four characters or the character for address $04ff is received, the bootloader program ter- minates the download and control is passed to the loaded program at $0400. for a detailed description of the m68hc11 bootstrap mode, refer to application note m68hc11 bootstrap mode (an1060/d). f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 18 mc68hc11c0ts/d 4 memory expansion and chip selects the mc68hc11c0 has the ability to extend the addressing range of the m68hc11 cpu beyond the physical 64-kbyte limit of the 16 cpu address lines. the extra addressing capability is provided by a register-based paging scheme using two expansion address lines and the physical 64 kbytes of cpu address space. two additional on-chip blocks are necessary to support extended addressing. the first block imple- ments additional address lines that become active only when required by the cpu. the second block provides chip-select signals that simplify the interface to external peripheral devices. both of these blocks are fully programmable by values written to associated control registers. 4.1 memory expansion memory expansion is achieved by manipulating the cpu address lines such that, even though the cpu cannot distinguish more than 64 kbytes of physical memory, up to 256 kbytes can be accessed through a paged memory scheme. additional address lines xa[17:16] are provided to allow banks of expanded memory to be selected to appear in a specified bank window. xa[17:16] are implemented as alternate functions of port g pins pg[2:1]. bits in the port g enable register (pgen) define which port g pins are used for chip selects and memory expansion address lines and which are used for general-purpose i/ o. port g pull-ups are enabled out of reset in order to provide a logic level one on all chip select and memory expansion address lines. the mem[1:0] bits in pgen select one of the three memory expansion modes. xa[17:10] in mxhadr/ mxladr contain the expansion address offset with respect to the current cpu address. when memory expansion is enabled, and the cpu address falls within the memory expansion window defined by val- ues in pgxadr registers, csprog is activated and the cpu address addr[15:0] will be added to the value in mxhadr/mxladr and possibly extended to include xa[17:16] before being driven out to the external device. xa[17:16] will be used only if addressing is extended beyond 64 kbytes. if the cpu address falls outside the expansion window, addr[15:10] simply reflect the internal cpu address. ad- dr[9:0] always reflect the internal cpu address. refer to the memory expansion and program chip select block diagram. in 64-kbyte mode with no expansion, addressing is limited to 64 kbytes and addr[15:10] are used to decode the chip selects. chip select granularity is 1 kbyte. memory expansion is disabled. the pro- gram/vector chip select is disabled. addr[15:10] reflect the internal cpu address signals. in 64-kbyte expansion mode, addressing is limited to 64 kbytes and addr[15:10] are used to decode the chip selects. cpu address addr[15:10] are recalculated based on the value in mxhadr/mxladr registers before being driven out on addr[15:10] pins. the program chip select is active if the cpu address falls within the chip select range defined by values in pgxadr registers. if the cpu address falls outside the chip select window, addr[15:10] remain unchanged and simply reflect the internal ad- dress signals. xa[17:16] are general-purpose i/o. addr[9:0] always reflect the cpu address signals. in 128-kbyte expansion mode, addr[15:10] are used to decode the chip selects. if the cpu address falls within the chip select range defined by values in pgxadr registers, it is activated and cpu address addr[15:10] are recalculated based on the value in mxhadr/mxladr registers before being driven out on xa16 and addr[15:10] pins. if the cpu address falls outside the chip select window, ad- dr[15:10] simply reflect the internal address signals. xa16 reflects the state of the xa16 bit in mx- hadr. xa17 is general-purpose i/o. addr[9:0] always reflect the cpu address. in 256-kbyte expansion mode, addr[15:10] are used to decode the chip selects. if the cpu address falls within the chip select range defined by values in pgxadr registers, it is activated and cpu address addr[15:10] are recalculated based on the value in mxhadr/mxladr registers before being driven out on xa[17:16] and addr[15:10] pins. if the cpu address falls outside the chip select window, ad- dr[15:10] simply reflect the internal address signals. xa[17:16] reflect the state of the xa[17:16] bits in mxhadr/mxladr. addr[9:0] always reflect the cpu address. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 19 figure 6 memory expansion and program chip select block diagram in the following example the user has constructed a system composed of the mc68hc11c0 mcu and a single 256-kbyte external memory device. since the user wishes to access all locations in the external memory, the 256-kbyte expansion mode is chosen (mem[1:0] = 1:1). the window in which the pages of expanded memory will appear is programmed to be located at $6000?afff (pgsadr = $60, pge- adr = $b0). note that this also defines the range of the program chip select. pgen0 must be set in order for csprog to drive the external pin. since the expansion window has been defined as 20 kbytes in length, the 256-kbyte external memory will be divided into 20-kbyte segments (twelve 20- kbyte pages and one 16-kbyte page). the vector chip select has been programmed to begin at $d000. if the cpu address falls within the vector chip select range the vector chip select (csv) is activated and xa[17:16] are forced high to ensure that the very top of the external memory is accessed. refer to the memory expansion address translation example diagram. in this example the user will access the 20-kbyte block in the external memory starting at external ad- dress $0a000. the following are the corresponding parameters involved in the translation: desired starting expansion page address ?ma[17:10] = $0a0 = %00 1010 00 desired starting window address ?psa[15:10] = $60 = %0110 00 in general, the formula for the value required in mxhadr/mxladr is: xa[17:10] = ma[17:10] ?sa[15:10] the equation for this example translation is: xa[17:10] = $0a0 ?60 + mxhadr mxladr cpu addr[15:10] cpu addr[9:0] mem1 mem0 pgsaddr pgeaddr csprog addr[17:10] addr[9:0] 6 6 8 10 6 2 compare addr[15:10] 3 psa[15:10] ? compare addr[15:10] < pea[15:10] ? f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 20 mc68hc11c0ts/d since the translation is performed as a two's complement operation the following calculation is per- formed: thus, mxhadr/mxladr must contain the value $040 to cause the external 20-kbyte page beginning at $0a000 to appear in the memory expansion window. figure 7 memory expansion address translation example (256k mode) although there are three expansion modes, the manner in which the expansion address is defined is identical. each of the memory expansion modes has a slightly different formula for calculating the ex- pansion address. they are defined as follows: 64k expansion mode: xa[15:10] = ma[15:10] ?psa[15:10]; xa[17:16] are not used 128k expansion mode: xa[16:10] = ma[16:10] ?psa[15:10]; xa17 is not used 17 16 15 12 11 8 7 4 3 0 0 0 1 0 1 0 0 0 x x x x x x x x x x ma[17:10] $0a0 x x 0 1 1 0 0 0 x x x x x x x x x x ?sa[15:10] ?60 0 0 0 1 0 0 0 0 xa[17:10] $040 00000 05000 0a000 page 1 ?20k page 2 ?20k page 0 ?20k 3c000 page 12 ?20k 3d000 4k 3ffff 12k 0f000 $0000 $0400 $04ff b000 ffff 256 bytes ram 8k vector code ?12k register block ?128 $6000 bank window ?20k (psa[15:10] = $60) (pea[15:10] = $b0) d000 ??????0 0 0 1 0 0 0 0 0 0 mxhadr mxladr addr[15:0] = $7245 (% 0111001001000101) xa[17:10] = $040 (% 00010000) new addr[17:0] = $0b245 (% 001011001001000101) overlap with vector chip select external 256-kbyte memory device mcu 64-kbyte address space memory expansion address registers $007f mxhadr = $00 (xa[17:16]) mxladr = $40 (xa[15:10]) pgsadr = $60 (psa[15:10]) pgeadr = $b0 (pea[15:10]) vcsadr = $d0 (va[15:10]) pgen0 = 1 afff ? ? f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 21 256k expansion mode: xa[17:10] = ma[17:10] ?psa[15:10] where, xa = expansion address ma = most significant bits of the starting address of the active page of expanded memory psa = bits in pgsadr register pgen[7:3] ?port g enable bits [7:3] 0 = corresponding port g pin configured for general-purpose i/o. 1 = corresponding port g pin configured for general-purpose chip select output. mem[1:0] ?memory expansion mode select bits pgen0 ?port g enable bits 0 0 = pg0 configured for general-purpose i/o. 1 = pg0 configured for vector/program chip select output. xa[17:16] ?memory expansion address [17:16] refer to memory expansion and program chip select block diagram. xa[15:10] ?memory expansion address [15:10] refer to memory expansion and program chip select block diagram. pgen ?port g enable $0071 bit 7 654321 bit 0 pgen7 pgen6 pgen5 pgen4 pgen3 mem1 mem0 pgen0 reset: 0 0000000 mem1 mem0 expansion mode pg2 pg1 0 0 64-kbyte cpu address, no expansion i/o i/o 0 1 64-kbyte expansion i/o i/o 1 0 128-kbyte expansion i/o xa16 1 1 256-kbyte expansion xa17 xa16 mxhadr ?memory expansion address high $0044 bit 7 654321 bit 0 xa17 xa16 reset: 0 0000000 mxladr ?memory expansion address low $0045 bit 7 654321 bit 0 xa15 xa14 xa13 xa12 xa11 xa10 reset: 0 0000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 22 mc68hc11c0ts/d 4.2 chip selects seven chip select signals are provided to simplify the interface to external components. five general- purpose and one program/vector chip select pin are implemented as alternate functions of port g pins. port g pull-ups are enabled out of reset in order to provide a logic level one on all chip select and mem- ory expansion address lines. the chip selects are designed to operate with or without memory expan- sion. all chip selects are prioritized so that they never conflict with each other or with on-chip resources. general-purpose chip selects are automatically activated (if enabled) whenever the current cpu ad- dress falls within a range defined by the associated control registers for each chip select. all general- purpose chip selects use the same format for selecting starting address, ending address, and clock stretch. each of the five general-purpose chip selects has two control registers associated with it. the first register (gpxsadr) selects the upper six msb of the starting address and selects the clock stretch. the second register (gpxeadr) selects the upper six msb of the ending address. since these bits are the upper six msb, the granularity of each chip select range is 1024?ytes. each general-purpose chip select is an active-low signal with a programmable clock stretch from zero to three e-clock cycles. bits in the pgen register enable each of the five general-purpose chip selects. when a chip select is en- abled, the corresponding port g pin is forced to be an output regardless of the state of the ddgx bit. the program chip select (csprog ) simplifies the interface to external devices and functions with or without memory expansion. cpu address lines addr[15:10] are always used to decode the program chip select; therefore, its granularity is fixed at 1 kbyte. the range is defined by bits in pgsadr and pgeadr. when the cpu address falls within the defined range, csprog is asserted. if memory ex- pansion is enabled, the range of the program chip select corresponds to the memory expansion win- dow. in this case, csprog will be asserted and the current cpu address will become modified according to the contents of the memory expansion address registers mxhadr and mxladr before being driven out to the external device. refer to 4.1 memory expansion for more information. the vector chip select (csv) is provided for the vector space and, because there is no internal memory at the reset vector address, is enabled for the entire address space out of reset in expanded mode. vc- sadr selects the upper six msb of the starting address. since these bits are the upper six msb, the granularity of the vector chip select range is 1024 bytes. the ending address is the highest address ($ffff). the vector chip select is an active-low signal with a programmable clock stretch from zero to three e-clock cycles. bits in the pgen register enable each of the five general-purpose chip selects. whenever the cpu logical address falls within the range defined by vcsadr, csv is asserted and the current cpu logical address is driven out addr[15:0] to the external memory device. xa[17:16] (if en- abled) are always driven high when vector space is selected to ensure that the vector space is always located at the top of the address space. csv is configured for one cycle of clock stretch out of reset in expanded mode. this can be altered by changing the values in pstha and psthb in pgsadr regis- ter. when csv is enabled, pg0 is forced to be an output regardless of the state of the ddg0 bit. caution if program code is contained in an external memory, the range for csprog must be defined before the vector chip select range is changed. this prevents the pro- gram from being lost at the point when csv is changed. the range of the program chip select is defined as follows: psa[15:10] addr[15:10] < pea[15:10] the range of the vector chip select is defined as follows: vsa[15:10] addr[15:10] $3fff where, psa = bits in pgsadr register pea = bits in pgeadr register vsa = bits in vcsadr register addr = cpu logical address f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 23 chip selects are arranged in the following priority: va[15:10] ?vector chip select address selects the msb of the vector chip select starting address. psa[15:10] ?program chip select starting address psth[a:b] ?program/vector chip select clock stretch select pea[15:10] ?program chip select ending address priority resource highest on-chip registers on-chip boot rom (if enabled) on-chip ram (if enabled) vector chip select (csv) program chip select (csprog ) general-purpose chip select 1 (csgp1) general-purpose chip select 2 (csgp2) general-purpose chip select 3 (csgp3) general-purpose chip select 4 (csgp4) lowest general-purpose chip select 5 (csgp5) vcsadr ?vector chip select base address $0040 bit 7 654321 bit 0 va15 va14 va13 va12 va11 va10 reset: 0 0000000 pgsadr ?program chip select starting address $0042 bit 7 654321 bit 0 psa15 psa14 psa13 psa12 psa11 psa10 pstha psthb reset: 00000001 expanded mode 00000000 test mode pstha psthb clock stretch 0 0 none 0 1 1 e-clock cycle 1 0 2 e-clock cycles 1 1 3 e-clock cycles pgeadr ?program chip select ending address $0043 bit 7 654321 bit 0 pea15 pea14 pea13 pea12 pea11 pea10 reset: 0 0000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 24 mc68hc11c0ts/d gs1a[15:10] ?program chip select starting address g1sth[a:b] ?program chip select clock stretch select ge1a[15:10] ?program chip select ending address gs2a[15:10] ?program chip select starting address g2sth[a:b] ?program chip select clock stretch select ge2a[15:10] ?program chip select ending address gp1sadr ?general-purpose chip select 1 starting address $0046 bit 7 654321 bit 0 gs1a15 gs1a14 gs1a13 gs1a12 gs1a11 gs1a10 gs1tha gs1thb reset: 0 0000000 g1stha g1sthb clock stretch 0 0 none 0 1 1 e-clock cycle 1 0 2 e-clock cycles 1 1 3 e-clock cycles gp1eadr ?general-purpose chip select 1 ending address $0047 bit 7 654321 bit 0 ge1a15 ge1a14 ge1a13 ge1a12 ge1a11 ge1a10 reset: 0 0000000 gp2sadr ?general-purpose chip select 2 starting address $0048 bit 7 654321 bit 0 gs2a15 gs2a14 gs2a13 gs2a12 gs2a11 gs2a10 gs2tha gs2thb reset: 0 0000000 g2stha g2sthb clock stretch 0 0 none 0 1 1 e-clock cycle 1 0 2 e-clock cycles 1 1 3 e-clock cycles gp2eadr ?general-purpose chip select 2 ending address $0049 bit 7 654321 bit 0 ge2a15 ge2a14 ge2a13 ge2a12 ge2a11 ge2a10 reset: 0 0000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 25 gs3a[15:10] ?program chip select starting address g3sth[a:b] ?program chip select clock stretch select ge3a[15:10] ?program chip select ending address gs4a[15:10] ?program chip select starting address g4sth[a:b] ?program chip select clock stretch select ge4a[15:10] ?program chip select ending address gp3sadr ?general-purpose chip select 3 starting address $004a bit 7 654321 bit 0 gs3a15 gs3a14 gs3a13 gs3a12 gs3a11 gs3a10 gs3tha gs3thb reset: 0 0000000 g3stha g3sthb clock stretch 0 0 none 0 1 1 e-clock cycle 1 0 2 e-clock cycles 1 1 3 e-clock cycles gp3eadr ?general-purpose chip select 3 ending address $004b bit 7 654321 bit 0 ge3a15 ge3a14 ge3a13 ge3a12 ge3a11 ge3a10 reset: 0 0000000 gp4sadr ?general-purpose chip select 4 starting address $004c bit 7 654321 bit 0 ge3a15 ge3a14 ge3a13 ge3a12 ge3a11 ge3a10 reset: 0 0000000 g4stha g4sthb clock stretch 0 0 none 0 1 1 e-clock cycle 1 0 2 e-clock cycles 1 1 3 e-clock cycles gp4eadr ?general-purpose chip select 4 ending address $004d bit 7 654321 bit 0 ge4a15 ge4a14 ge4a13 ge4a12 ge4a11 ge4a10 reset: 0 0000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 26 mc68hc11c0ts/d gs5a[15:10] ?program chip select starting address g5sth[a:b] ?program chip select clock stretch select ge5a[15:10] ?program chip select ending address gp5sadr ?general-purpose chip select 5 starting address $004e bit 7 654321 bit 0 gs5a15 gs5a14 gs5a13 gs5a12 gs5a11 gs5a10 gs5tha gs5thb reset: 0 0000000 g5stha g5sthb clock stretch 0 0 none 0 1 1 e-clock cycle 1 0 2 e-clock cycles 1 1 3 e-clock cycles gp5eadr ?general-purpose chip select 5 ending address $004f bit 7 654321 bit 0 ge5a15 ge5a14 ge5a13 ge5a12 ge5a11 ge5a10 reset: 0 0000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 27 5 parallel input/output the mc68hc11c0 has up to 35 input/output lines, depending on the operating mode. the address and data bus have no associated ports and cannot be used for general-purpose i/o. pins on all ports except port e have selectable on-chip pull-up devices. a single bit in the port pull-up assignment register (ppar) enables the pull-up devices for all pins on the associated port. a pin's pull- up device is active only when the associated data direction bit configures that pin as an input. pull-ups for irq and xirq are active whenever port d pull-ups are enabled. port g pull-ups are enabled out of reset in order to provide a logic level one on all chip select and memory expansion address lines. port f pull-ups are also enabled out of reset and are active only when a port f pin is configured as an input. refer to the ppar register description. port a has eight fully bidirectional i/o pins. port a shares functions with the timer system. note that when pa7 is configured as an output (dda7 = 1) it is still the input to the pulse accumulator (pai). port d shares functions with the serial systems (sci and spi). because irq and xirq are now asso- ciated functions of port d, a new port d i/o control register (dioctl) has been added. port d functions are controlled by a combination of dioctl bits, data direction bits, sci and spi enable bits. refer to the portd description. port d has six bidirectional pins and one output-only pin. port e is a four-bit input-only port that shares functions with the a/d converter system. if the a/d system is not being used, port f pins can be used as general-purpose inputs. port f has seven bidirectional pins and shares functions with the keyboard interrupt inputs. port f pins not used for interrupt request inputs can be used for general-purpose i/o. port g is an eight-bit fully bidirectional i/o port. port g shares functions with the memory expansion ad- dress lines and the chip selects. pins not used for memory expansion address or chip select can be used for general-purpose i/o. port h is a two-bit bidirectional port. port h pins also serve as outputs for the two-channel pwm timer. the following table is a summary of the configuration and features of each port. port pin function is mode dependent. do not confuse pin function with the electrical state of the pin at reset. port pins are either driven to a specified logic level or are configured as high impedance inputs. i/o pins configured as high-impedance inputs have port data that is indeterminate. the contents of the corresponding latches are dependent upon the electrical state of the pins during reset. in port descrip- tions, an ??indicates this condition. port pins that are driven to a known logic level during reset are shown with a value of either one or zero. some control bits are unaffected by reset. reset states for these bits are indicated with a ?? port input pins output pins bidirectional pins on-chip pull-up devices shared functions port a 8 yes timer port d 1 6 yes sci, spi, irq , and xirq port e 4 no a/d converter port f 7 yes keyboard interrupt requests port g 8 yes memory expansion address and chip selects port h 2 yes pwm timer f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 28 mc68hc11c0ts/d the timer forces the i/o state to output for each port a line associated with an enabled output compare. in these cases the data direction bits will not be changed, but have no effect on these lines. the ddra will revert to controlling data direction when the associated timer compare is disabled. input captures do not force the i/o state of the pin or the state of ddra. dda[7:0] ?data direction for port a 0 = corresponding pin configured for input 1 = corresponding pin configured for output after reset pd[5:0] are configured as high impedance inputs. pd[5:0] share functions with the sci, spi, and two interrupt request lines (irq and xirq ). the actual function performed by each pin depends on bits in dioctl, sci/spi enable bits, and bits in the ddrd register. refer to the tables located in the dioctl register description. bits [7:6] ?not implemented always read zero ddd[5:0] ?data direction for port d 0 = input 1 = output porta ?port a data $0000 bit 7 654321 bit 0 pa7 pa6 pa5 pa4 pa3 pa2 pa1 pa0 reset: iiiiiiii alt. pin func.: pai oc2 oc3 oc4 oc5/ic4 ic1 ic2 ic3 and/or: oc1 oc1 oc1 oc1 oc1 ddra ?data direction register for port a $0001 bit 7 654321 bit 0 dda7 dda6 dda5 dda4 dda3 dda2 dda1 dda0 reset: 00000000 portd ?port d data $0008 bit 7 654321 bit 0 pd5 pd4 pd3 pd2 pd1 pd0 reset: 0 0 iiiiii alt. pin func.: ss sck sdo/ mosi sdi/ miso txd rxd or: irq xirq ddrd ?data direction register for port d $0009 bit 7 654321 bit 0 ddd5 ddd4 ddd3 ddd2 ddd1 ddd0 reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 29 bits [7:6] ?not implemented always read zero. dio[5:2] ?port d i/o control for port d bits [5:2] refer to the following tables for description. bit 1 ?not implemented always reads zero. dio0 ?port d i/o control for port d bit 0 refer to the following tables for description. notes: 1. if a pin is configured for general-purpose i/o, the ddrd bit controls the direction of data. 2. if a pin is configured as ss , the mstr and ddrd bits are the output enable. 3. spe is the spi enable bit, mstr is the master/slave select bit. refer to the spcr register. 4. irq or ss inputs are internally pulled high if not used. this does not affect the pin. notes: 1. if a pin is configured for general-purpose i/o, the ddrd bit controls the direction of data. 2. if a pin is configured as mosi, the mstr and ddrd bit control the direction of data. 3. spe is the spi enable bit, mstr is the master/slave select bit. refer to the spcr register. dioctl ?port d i/o control $0007 bit 7 654321 bit 0 dio5 dio4 dio3 dio2 dio0 reset: 00111100 table 3 pd5 configuration spi enable dioctl bit 5 dioctl bit 4 pd5 pull-up control output enable spe = 0 0 x i/o ddd5 ddd5 1 0 irq on off 1 1 i/o ddd5 ddd5 spe = 1 0 x i/o ddd5 ddd5 1 0 irq on off 11ss off mstr + ddd5 table 4 pd[4:3] configuration spi enable pd4 pd3 pull-up control output enable spe = 0 i/o i/o ddd[4:3] ddd[4:3] spe = 1 mosi sck off mstr + ddd[4:3] f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 30 mc68hc11c0ts/d notes: 1. if a pin is configured for general-purpose i/o, the ddrd bit controls the direction of data. 2. if a pin is configured as miso, the mstr and ddrd bit control the direction of data. 3. spe is the spi enable bit, mstr is the master/slave select bit. refer to the spcr register. 4. xirq or miso inputs are internally pulled high if not used. this does not affect the pin. notes: 1. if a pin is configured for general-purpose i/o, the ddrd bit controls the direction of data. 2. if a pin is configured for rxd input, there is no weak pull-up at the pin. 3. if a pin is configured for txd output, the output can be either an open-drain output or a cmos driver. this is controlled by the port d driver output mode (dodm) register. 4. te is the transmitter enable bit. re is the receiver enable bit. refer to the sccr2 register. note if any of the pins pd[5:2] are configured as spi inputs they will not have pull-ups. if any of the pins pd[5:2] are configured as spi outputs they will be either open- drain outputs or normal cmos driver outputs depending on the state of the corre- sponding bit in the dodm register. each dodm bit controls an individual port d pin and is valid only if the pin is configured as an output. table 5 pd2 configuration spi enable dioctl bit 3 dioctl bit 2 pd2 pull-up control output enable spe = 0 0 x i/o ddd[3:2] ddd[3:2] 1 0 xirq on off 1 1 i/o ddd[3:2] ddd[3:2] spe = 1 0 x i/o ddd[3:2] ddd[3:2] 1 0 xirq on off 1 1 miso off mstr + ddd[3:2] table 6 pd[1:0] configuration dioctl bit 0 sci enables pd1 pull-up control sci enables pd0 pull-up control sci mode 0 te = 1 txd off re = 1 rxd off two wire te = 0 i/o ddd1 re = 0 i/o ddd0 1 te = 1 txd off x i/o ddd0 single wire re = 0 te = 1 rxd off re = 0 te = 1 rxd/txd off re = 0 looped te = 1 i/o ddd1 re = 0 dodm ?port d open drain mode $0075 bit 7 654321 bit 0 dod6 dod5 dod4 dod3 dod2 dod1 dod0 reset: 00111100 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 31 dod[6:0] ?port d open drain bits [6:0] 0 = corresponding port d output pin configured as normal cmos driver. 1 = corresponding port d output pin configured as open-drain output driver. port e has four general-purpose input pins and shares functions with the a/d converter system. when any port e pins are being used as a/d inputs, porte should not be read during the sample portion of an a/d conversion. refer to 11 analog-to-digital converter . port f has seven bidirectional i/o lines. each line can be either general-purpose i/o or a maskable in- terrupt source. when corresponding bits in finten are set, port f lines become interrupt request in- puts. writes to portf drive pins only if the pins are configured for output and corresponding irq is disabled. refer to finten and fistat registers. refer to 6 resets and interrupts . bit 7 ?not implemented always reads zero. ddf[6:0] ?data direction for port f overridden if corresponding interrupt request input is enabled. 0 = input 1 = output is7 is the interrupt status bit for irq in port d. fistat can be read any time but cannot be written. all bits are cleared after cpu has read the register following an interrupt request. porte ?port e data $000a bit 7 654321 bit 0 pe3pe2pe1pe0 reset: 0000 iiii alt. pin func.: an3 an2 an1 an0 portf ?port f data register $0002 bit 7 654321 bit 0 pf6 pf5 pf4 pf3 pf2 pf1 pf0 reset: 00000000 alt. pin func.: irq7 irq6 irq5 irq4 irq3 irq2 irq1 dddrf ?data direction register for port f $0003 bit 7 654321 bit 0 ddf6 ddf5 ddf4 ddf3 ddf2 ddf1 ddf0 reset: 00000000 fistat ?port f interrupt status $0004 bit 7 654321 bit 0 is7 is6 is5 is4 is3 is2 is1 is0 reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 32 mc68hc11c0ts/d is7 ?irq status 0 = no interrupt pending for the corresponding interrupt line 1 = interrupt pending for the corresponding interrupt line is[6:0] ?irq[6:0] status 0 = no interrupt pending for the corresponding interrupt line 1 = interrupt pending for the corresponding interrupt line the enable bit for irq is located in the dioctl register. ie[6:0] ?irqx enable 0 = interrupt request input is disabled and pin is controlled by ddrf bit 1 = interrupt request input (irqx) is enabled, overriding state of ddrf bit port g is a fully bidirectional 8-bit port. port g shares functions with the memory expansion address lines and the external chip selects. refer to 4 memory expansion and chip selects . bit 7 ?not implemented always reads zero. ddg[6:0] ?data direction for port g overridden if corresponding interrupt request input is enabled. 0 = input 1 = output finten ?port f interrupt enable $0005 bit 7 654321 bit 0 ie6 ie5 ie4 ie3 ie2 ie1 ie0 reset: 00000000 portg ?port g data register $007e bit 7 654321 bit 0 pg7 pg6 pg5 pg4 pg3 pg2 pg1 pg0 reset: 0000000 0 alt. pin func.: gpcs5 gpcs4 gpcs3 gpcs2 gpcs1 xa17 xa16 csv/ csprog ddrg ?data direction register for port g $007f bit 7 654321 bit 0 ddg6 ddg5 ddg4 ddg3 ddg2 ddg1 ddg0 reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 33 pgen[7:3], pgen0 ?port g enable bits [7:3] and 0 pgenx must be set to output the corresponding chip select signal. pgenx overrides ddgx. 0 = corresponding port g pin configured for output 1 = corresponding port g pin configured for chip select function mem[1:0] ?memory expansion mode select mem[1:0] select the memory expansion mode. refer to the following table. port h has two bidirectional lines and shares functions with the pwm timer system. when a pwm timer channel is enabled the corresponding port h pin becomes an output regardless of the state of the ddhx bit. refer to 9 pulse-width modulation timer . bits [7:2] ?not implemented always read zero. ddh[1:0] ?data direction for port h 0 = input 1 = output pgen ?port g enable $0071 bit 7 654321 bit 0 pgen7 pgen6 pgen5 pgen4 pgen3 mem1 mem0 pgen0 reset: 00000001 mem1 mem0 memory expansion mode pg1 pg2 0 0 64 kbyte cpu address, no expansion i/o i/o 0 1 64 kbyte cpu address, 64 kbyte expansion i/o i/o 1 0 64 kbyte cpu address, 128 kbyte expansion addr16 i/o 1 1 64 kbyte cpu address, 256 kbyte expansion addr16 addr17 porth ?port h data register $007c bit 7 654321 bit 0 ph1ph0 reset: 0000000 0 alt. pin func.: pw2pw1 ddrh ?data direction register for port h $007d bit 7 654321 bit 0 ddh1 ddh0 reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 34 mc68hc11c0ts/d ppar can be read and written at any time. pull-ups for port f interrupt request lines (irq[6:0] ) are en- abled out of reset and are active only for port f pins configured as inputs. port f pull-up devices are not automatically activated when the associated interrupt request line is enabled. pull-up devices for other ports are automatically activated when pull-ups for that port are enabled and the associated pin is con- figured as an input. xppue ?port x pull-up enable 0 = pull-up devices for port x disabled 1 = pull-up devices for port x enabled bit 4 and bits [2:1] ?not implemented always reads zero. ppar ?port pull-up assignment register $0070 bit 7 654321 bit 0 hppue gppue fppue dppue appue reset: 11101001 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 35 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 36 mc68hc11c0ts/d 6 resets and interrupts the mc68hc11c0 has three reset vectors and 18 interrupt vectors. the reset vectors are as follows: ?reset , or power-on reset ?clock monitor fail ?cop failure the 18 interrupt vectors service 30 interrupt sources (three non-maskable, 27 maskable). the three non-maskable interrupt vectors are as follows: ?xirq pin (x-bit interrupt) ?illegal opcode trap ?software interrupt on-chip peripheral systems generate maskable interrupts, which are recognized only if the global inter- rupt mask bit (i) in the condition code register (ccr) is clear. maskable interrupts are prioritized accord- ing to a default arrangement; however, any one source can be elevated to the highest maskable priority position by a software-accessible control register, hprio. the hprio register can be written at any time, provided the i bit in the ccr is set. twenty-seven interrupt sources in the mc68hc11c0 are subject to masking by a global interrupt mask bit (i bit in the ccr). in addition to the global i bit, all of these sources are controlled by local enable bits in control registers. most interrupt sources in m68hc11 devices have separate interrupt vectors; there- fore, it is not usually necessary for software to poll control registers to determine the cause of an inter- rupt. in the case of the keyboard interrupt inputs, software must poll the port f interrupt status register (fistat) immediately following an interrupt to determine its source. for some interrupt sources, such as the sci and keyboard interrupts, flags are automatically cleared during the normal course of responding to the interrupt requests. for example, the rdrf flag in the sci system is cleared by an automatic clearing mechanism consisting of a read of the sci status register while rdrf is set, followed by a read of the sci data register. the normal response to an rdrf inter- rupt request would be to read the sci status register to check for receive errors, then to read the re- ceived data from the sci data register. these two steps satisfy the automatic clearing mechanism without requiring any special instructions. similarly, port f interrupt status register (fistat) is cleared when the cpu reads the register to determine which input was the source of the interrupt. refer to the following table for interrupt and reset vector assignments. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 37 * same level as an instruction *can be written only once in first 64 cycles out of reset in normal mode, or at any time in special modes. adpu ?analog-to-digital converter power up refer to 11 analog-to-digital converter . csel ?clock select refer to 11 analog-to-digital converter . vector address interrupt source ccr mask bit local mask priority (1 = high) ffc0, c1 ffd4, d5 reserved ffd6, d7 sci serial system i sci receive data register full rie sci receiver overrun rie 23 sci transmit data register empty tie sci transmit complete tcie sci idle line detect ilie ffd8, d9 spi serial transfer complete i spie 22 ffda, db pulse accumulator input edge i paii 21 ffdc, dd pulse accumulator overflow i paovi 20 ffde, df timer overflow i toi 19 ffe0, e1 timer input capture 4/output compare 5 i i4/o5i 17 ffe2, e3 timer output compare 4 i oc4i 14 ffe4, e5 timer output compare 3 i oc3i 13 ffe6, e7 timer output compare 2 i oc2i 12 ffe8, e9 timer output compare 1 i oc1i 11 ffea, eb timer input capture 3 i ic3i 10 ffec, ed timer input capture 2 i ic2i 9 ffee, ef timer input capture 1 i ic1i 8 fff0, f1 real time interrupt i rtii 7 fff2, f3 parallel i/o handshake i none 6 irq i none 5 irq[6:0] i ie[6:0] 5 fff4, f5 xirq pin x none 4 fff6, f7 software interrupt none none * fff8, f9 illegal opcode trap none none * fffa, fb cop failure none nocop 3 fffc, fd clock monitor fail none cme 2 fffe, ff reset none none 1 option ?system configuration options $0039 bit 7 654321 bit 0 adpu csel irqe* dly* cme cr1* cr0* reset: 00010000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 38 mc68hc11c0ts/d irqe ?irq select edge sensitive only 0 = low level recognition 1 = falling edge recognition dly ?enable oscillator start-up delay on exit from stop 0 = no stabilization delay on exit from stop 1 = stabilization delay enabled on exit from stop cme ?clock monitor enable 0 = clock monitor disabled; slow clocks can be used 1 = slow or stopped clocks cause clock failure reset bit 2 ?not implemented always reads zero cr[1:0] ?cop timer rate select refer to the following table of cop timer rates. bits [7:4] ?not implemented always read zero nosec ?cop system disable refer to 3 on-chip memory . nocop ?cop system disable resets to programmed value 0 = cop enabled (forces reset on time-out) 1 = cop disabled (does not force reset on time-out) romon ?rom/eprom enable refer to 3 on-chip memory . eeon ?cop system disable refer to 3 on-chip memory . table 7 cop timer rate select cr[1:0] divide e by xtal = 4.0 mhz time-out ? ms, +32.8 ms xtal = 8.0 mhz time-out ? ms, +16.4 ms xtal = 12.0 mhz time-out ? ms, +10.9 ms 0 0 2 15 32.768 ms 16.384 ms 10.923 ms 0 1 2 17 131.072 ms 65.536 ms 43.691 ms 1 0 2 19 524.288 ms 262.140 ms 174.76 ms 1 1 2 21 2.097 s 1.049 s 699.05 ms e = 1.0 mhz 2.0 mhz 3.0 mhz config ?system configuration register $003f bit 7 654321 bit 0 nosec nocop romon eeon reset: 00001111 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 39 *rboot, smod, and mda reset depend on power-up initialization mode. rboot ?read bootstrap rom refer to 2 operating modes . smod ?special mode select refer to 2 operating modes . mda ?mode select a refer to 2 operating modes . bit 4 ?not implemented always reads zero. psel[3:0] ?priority select bits [3:0] can be written only while the i bit in the ccr is set (interrupts disabled). these bits select one interrupt source to be elevated above all other i-bit related sources. hprio ?highest priority i-bit interrupt and miscellaneous $003c bit 7 654321 bit 0 rboot* smod* mda* psel3 psel2 psel1 psel0 reset: 00101 pselx interrupt source promoted 3210 0000 timer overflow 0001 pulse accumulator overflow 0010 pulse accumulator input edge 0011 spi serial transfer complete 0100 sci serial system 0101 reserved (default to irq ) 0110 irq and irq[6:0] 0111 real-time interrupt 1000 timer input capture 1 1001 timer input capture 2 1010 timer input capture 3 1011 timer output compare 1 1100 timer output compare 2 1101 timer output compare 3 1110 timer output compare 4 1111 timer output compare 5/input capture 4 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 40 mc68hc11c0ts/d 6.1 external interrupt requests the mc68hc11c0 has a total of nine external interrupt inputs. in addition to the two external interrupts found on other m68hc11 devices (irq and xirq ), seven more inputs for interrupt requests have been added. the seven additional inputs have been implemented as alternate functions of port f pins. the interrupt request inputs irq[6:0] are individually enabled by bits in the finten register. the irq and xirq inputs have been moved and are now alternate functions of port d. the irq and irq[6:0] interrupt sources are maskable and share the same priority. these interrupt sources can be masked globally by bit i in the condition code register as well as locally by enable bits in control registers. irq[6:0] are enabled by bits in the finten register. irq is enabled by bits in dio- ctl register. since irq[6:0] have the same priority as irq , software must poll an interrupt status reg- ister (fistat) to determine the source of the interrupt request. fistat is automatically cleared when it is read by the cpu. fistat can be read at any time but cannot be written. refer to the descriptions of port f, finten and fistat. when corresponding bits in finten are set, port f lines become interrupt request inputs. writes to portf drive pins only if the pins are configured for output and corresponding irq is disabled. is7 is the interrupt status bit for irq in port d. fistat can be read any time but cannot be written. all bits are cleared after cpu has read the register following an interrupt request. is7 ?irq status 0 = no interrupt pending for the corresponding interrupt line 1 = interrupt pending for the corresponding interrupt line is[6:0] ?irq[6:0] status 0 = no interrupt pending for the corresponding interrupt line 1 = interrupt pending for the corresponding interrupt line the enable bit for irq is located in the dioctl register. ie[6:0] ?irq[6:0] enable 0 = interrupt request input is disabled and pin is controlled by ddrf bit 1 = interrupt request input irqx is enabled, overriding state of ddrf bit portf ?port f data register $0002 bit 7 654321 bit 0 pf6 pf5 pf4 pf3 pf2 pf1 pf0 reset: 0000000 0 alt. pin func.: irq6 irq5 irq4 irq3 irq2 irq1 irq0 fistat ?port f interrupt status $0004 bit 7 654321 bit 0 is7 is6 is5 is4 is3 is2 is1 is0 reset: 00000000 finten ?port f interrupt enable $0005 bit 7 654321 bit 0 ie6 ie5 ie4 ie3 ie2 ie1 ie0 reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 41 mc68hc11c0ts/d 7 main timer the design of the main timer is based on a free-running 16-bit counter with a four-stage programmable prescaler. a timer overflow function allows software to extend the system's timing capability beyond the counter's 16-bit range. the timer has three input capture channels, four output compare channels, and one channel that can be configured as a fourth input capture or a fifth output compare. refer to the following table for a summary of the crystal-related frequencies and periods. table 8 timer summary control bits xtal frequencies 4.0 mhz 8.0 mhz 12.0 mhz other rates 1.0 mhz 2.0 mhz 3.0 mhz (e) 1000 ns 500 ns 333 ns (1/e) pr[1:0] main timer count rates 0 0 1 count overflow 1000 ns 65.536 ms 500 ns 32.768 ms 333 ns 21.845 ms (1/e) (2 16 /e) 0 1 1 count overflow 4.0 m s 262.14 ms 2.0 m s 131.07 ms 1.333 m s 87.381 ms (4/e) (2 18 /e) 1 0 1 count overflow 8.0 m s 524.28 ms 4.0 m s 262.14 ms 2.667 m s 174.76 ms (8/e) (2 19 /e) 1 1 1 count overflow 16.0 m s 1.049 ms 8.0 m s 524.29 ms 5.333 m s 349.52 ms (16/e) (2 20 /e) rtr[1:0] periodic (rti) interrupt rates 0 0 0 1 1 0 1 1 8.192 ms 16.384 ms 32.768 ms 65.536 ms 4.096 ms 8.192 ms 16.384 ms 32.768 ms 2.731 ms 5.461 ms 10.923 ms 21.845 ms (2 13 /e) (2 14 /e) (2 15 /e) (2 16 /e) cr[1:0] cop watchdog time-out rates 0 0 0 1 1 0 1 1 32.768 ms 131.072 ms 524.288 ms 2.098 s 16.384 ms 65.536 ms 262.14 ms 1.049 s 10.923 ms 43.691 ms 174.76 ms 699.05 ms (2 15 /e) (2 17 /e) (2 19 /e) (2 21 /e) time-out tolerance (? ms/+...) 32.8 ms 16.4 ms 10.9 ms (2 15 /e) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 42 mc68hc11c0ts/d figure 8 timer block diagram pa3 oc5/ ic4/ oc1 16-bit latch clk tic1 (hi) 16-bit comparator = ic3f oc2f oc3f i4/o5f tflg1 tmsk1 ic1f ic1i 3 ic2f ic2i 2 ic3i 1 oc4f i4/o5i 16-bit timer bus 16-bit free-running counter tcnt (hi) tof toi 9 pr1 pr0 prescaler?ivide by 1, 4, 8, or 16 i4/o5 oc1i 8 foc1 oc2i 7 foc2 oc3i 6 foc3 oc4i 5 foc4 4 foc5 status flags force output compare interrupt enables port a oc5 ic4 cforc 16-bit timer bus oc1f bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 pin functions tcnt (lo) pa2/ ic1 tic1 (lo) 16-bit latch clk tic2 (hi) tic2 (lo) 16-bit latch clk tic3 (hi) tic3 (lo) toc1 (hi) toc1 (lo) toc2 (hi) toc2 (lo) toc3 (hi) toc3 (lo) toc4 (hi) toc4 (lo) 16-bit latch clk ti4/o5 (hi) ti4/o5 (lo) 16-bit comparator = 16-bit comparator = 16-bit comparator = 16-bit comparator = mcu eclk interrupt requests (further qualified by i-bit in ccr) pin control pa7/ oc1/ pai pa6/ oc2/ oc1 pa5/ oc3/ oc1 pa4/ oc4/ oc1 pa1/ ic2 pa0/ ic3 to pulse accumulator taps for rti, cop watchdog and pulse accumulator f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 43 mc68hc11c0ts/d foc[5:1] ?force output compare write ones to force compare(s) 0 = not affected 1 = output x action occurs bits [2:0] ?not implemented always read zero set bit(s) to enable oc1 to control corresponding pin(s) of port a. bits [2:0] ?not implemented always read zero if oc1mx is set, data in oc1dx is output to port a bit x on successful oc1 compares. bits [2:0] ?not implemented always read zero tcnt resets to $0000. in normal modes, tcnt is read-only. ticx not affected by reset cforc ?timer compare force $000b bit 7 654321 bit 0 foc1 foc2 foc3 foc4 foc5 reset: 00000000 oc1m ?output compare 1 mask $000c bit 7 654321 bit 0 oc1m7 oc1m6 oc1m5 oc1m4 oc1m3 reset: 00000000 oc1d ?output compare 1 data $000d bit 7 654321 bit 0 oc1d7 oc1d6 oc1d5 oc1d4 oc1d3 reset: 00000000 tcnt ?timer count $000e?000f $000e bit 15 14 13 12 11 10 9 bit 8 high $000f bit 7 654321 bit 0 low tic1?ic3 ?timer input capture $0010?0015 $0010 bit 15 14 13 12 11 10 9 bit 8 high tic1 $0011 bit 7 654321 bit 0 low $0012 bit 15 14 13 12 11 10 9 bit 8 high tic2 $0013 bit 7 654321 bit 0 low $0014 bit 15 14 13 12 11 10 9 bit 8 high tic3 $0015 bit 7 654321 bit 0 low f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 44 mc68hc11c0ts/d all tocx register pairs reset to ones ($ffff). this is a shared register and is either input capture 4 or output compare 5 depending on the state of bit i4/o5 in pactl. writes to ti4/o5 have no effect when this register is configured as input capture 4. the ti4/o5 register pair resets to ones ($ffff). om[5:2] ?output mode ol[5:2] ?output level toc1?oc4 ?timer output compare $0016?001d $0016 bit 15 14 13 12 11 10 9 bit 8 high toc1 $0017 bit 7 654321 bit 0 low $0018 bit 15 14 13 12 11 10 9 bit 8 high toc2 $0019 bit 7 654321 bit 0 low $001a bit 15 14 13 12 11 10 9 bit 8 high toc3 $001b bit 7 654321 bit 0 low $001c bit 15 14 13 12 11 10 9 bit 8 high toc4 $001d bit 7 654321 bit 0 low ti4/o5 ?timer input capture 4/output compare 5 $001e?001f $001e bit 15 14 13 12 11 10 9 bit 8 high $001f bit 7 654321 bit 0 low tctl1 ?timer control 1 $0020 bit 7 654321 bit 0 om2 ol2 om3 ol3 om4 ol4 om5 ol5 reset: 00000000 omx olx action taken on successful compare 0 0 timer disconnected from output pin logic 0 1 toggle ocx output line 1 0 clear ocx output line to zero 1 1 set ocx output line to one f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 45 mc68hc11c0ts/d oc1i ?c4i ?output compare x interrupt enable if the ocxf flag bit is set while the ocxi enable bit is set, a hardware interrupt sequence is requested. i4/o5i ?input capture 4 or output compare 5 interrupt enable when i4/o5 in pactl is one, i4/o5i is the input capture 4 interrupt bit. when i4/o5 in pactl is zero, i4/o5i is the output compare 5 interrupt control bit. ic1i ?c3i ?input capture x interrupt enable if the icxf flag bit is set while the icxi enable bit is set, a hardware interrupt sequence is requested. note control bits in tmsk1 correspond bit for bit with flag bits in tflg1. ones in tmsk1 enable the corresponding interrupt sources. clear flags by writing a one to the corresponding bit position(s). oc1f ?c4f ?output compare x flag set each time the counter matches output compare x value i4/o5f ?input capture 4/output compare 5 flag set by ic4 or oc5, depending on which function was enabled by i4/o5 of pactl ic1f ?c3f ?input capture x flag set each time a selected active edge is detected on the icx input line tctl2 ?timer control 2 $0021 bit 7 654321 bit 0 edg4b edg4a edg1b edg1a edg2b edg2a edg3b edg3a reset: 00000000 table 9 timer control configuration edgxb edgxa configuration 0 0 capture disabled 0 1 capture on rising edges only 1 0 capture on falling edges only 1 1 capture on any edge tmsk1 ?timer interrupt mask 1 $0022 bit 7 654321 bit 0 oc1i oc2i oc3i oc4i i4/o5i ic1i ic2i ic3i reset: 00000000 tflg1 ?timer interrupt flag 1 $0023 bit 7 654321 bit 0 oc1f oc2f oc3f oc4f i4/o5f ic1f ic2f ic3f reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 46 mc68hc11c0ts/d toi ?timer overflow interrupt enable 0 = tof interrupts disabled 1 = interrupt requested when tof is set rtii ?real-time interrupt enable 0 = rtif interrupts disabled 1 = interrupt requested when paovf is set paovi ?pulse accumulator overflow interrupt enable refer to 8 pulse accumulator . paii ?pulse accumulator input interrupt enable refer to 8 pulse accumulator . bits [3:2] ?not implemented always read zero pr[1:0] ?timer prescaler select in normal modes, pr0 and pr1 can only be written once, and the write must occur within 64 cycles after reset. the following table shows the prescaler selected with each combination of pr[1:0]. refer to table 8 table for specific timing values. note control bits [7:4] in tmsk2 correspond bit for bit with flag bits [7:4] in tflg2. ones in tmsk2 enable the corresponding interrupt sources. clear flags by writing a one to the corresponding bit position(s). tof ?timer overflow flag set when tcnt changes from $ffff to $0000 rtif ?real-time interrupt flag set periodically. refer to rtr[1:0] in pactl register. paovf ?pulse accumulator overflow flag refer to 8 pulse accumulator . tmsk2 ?timer interrupt mask 2 $0024 bit 7 654321 bit 0 toi rtii paovi paii pr1 pr0 reset: 00000000 pr[1:0] prescaler 0 0 ? 1 0 1 ? 4 1 0 ? 8 1 1 ? 16 tflg2 ?timer interrupt flag 2 $0025 bit 7 654321 bit 0 tof rtif paovf paif reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 47 mc68hc11c0ts/d paif ?pulse accumulator input edge flag refer to 8 pulse accumulator . bits [3:0] ?not implemented always read zero bit 7 ?not implemented always reads zero. paen ?pulse accumulator system enable refer to 8 pulse accumulator . pamod ?pulse accumulator mode refer to 8 pulse accumulator . pedge ?pulse accumulator edge control refer to 8 pulse accumulator . bit 3 ?not implemented always reads zero. i4/o5 ?input capture 4/output compare 5 configure ti4/o5 for input capture or output compare. 0 = oc5 enabled 1 = ic4 enabled rtr[1:0] ?real-time interrupt (rti) rate refer to 8 pulse accumulator . *can be written only once in first 64 cycles out of reset in normal modes or at any time in special modes. adpu ?a/d converter power up refer to 11 analog-to-digital converter . csel ?clock select 0 = a/d charge pumps use system e clock 1 = a/d charge pumps use internal rc clock irqe ?irq select edge-sensitive only refer to 6 resets and interrupts . dly ?enable oscillator start-up delay refer to 6 resets and interrupts . pactl ?pulse accumulator control $0026 bit 7 654321 bit 0 paen pamod pedge i4/o5 rtr1 rtr0 reset: 00000000 option ?system configuration options $0039 bit 7 654321 bit 0 adpu csel irqe* dly* cme cr1* cr0* reset: 00010000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 48 cme ?clock monitor enable 0 = clock monitor disabled; slow clocks can be used 1 = slow or stopped clocks cause clock failure reset bit 2 ?not implemented always reads zero cr[1:0] ?cop timer rate select refer to the following table of cop timer rates. write $55 to coprst to arm cop watchdog clearing mechanism. write $aa (%10101010) to co- prst to reset cop watchdog. table 10 cop timer rate select cr[1:0] divide e/ 2 15 by xtal = 4.0 mhz time-out ? ms, +32.8 ms xtal = 8.0 mhz time-out ? ms, +16.4 ms xtal = 12.0 mhz time-out ? ms, +10.9 ms 0 0 1 32.768 ms 16.384 ms 10.923 ms 0 1 4 131.072 ms 65.536 ms 43.691 ms 1 0 16 524.288 ms 262.140 ms 174.76 ms 1 1 64 2.097 s 1.049 s 699.05 ms e = 1.0 mhz 2.0 mhz 3.0 mhz coprst ?arm/reset cop timer circuitry $003a bit 7 654321 bit 0 76543210 reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 49 8 pulse accumulator the mc68hc11c0 has an 8-bit counter that can be configured for gated time accumulation or to oper- ate as a simple event counter. the pulse accumulator counter can be read or written at any time. the pa7 pin can be configured to act as a clock in event counting mode, or as a gate signal to enable a free-running clock (e divided by 64) to the 8-bit counter in gated time accumulation mode. figure 9 pulse accumulator system block diagram selected crystal common xtal frequencies 4.0 mhz 8.0 mhz 12.0 mhz cpu clock (e) 1.0 mhz 2.0 mhz 3.0 mhz cycle time (1/e) 1000 ns 500 ns 333 ns pulse accumulator (in gated mode) (2 6 /e) 1 count 64.0 m s 32.0 m s 21.330 m s (2 14 /e) overflow 16.384 ms 8.192 ms 5.491 ms output buffer from main timer oc1 from ddra7 pedge pamod paen pactl control internal data bus pacnt 8-bit counter pa7/ pai/ oc1 interrupt requests paif paovf tflg2 interrupt status paovi paii paovf paovi paif paii tmsk2 int enables 1 2 overflow enable disable flag setting clock pai edge paen paen 2:1 mux input buffer and edge detector data bus pin e ? 64 clock (from main timer) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 50 mc68hc11c0ts/d toi ?timer overflow interrupt enable refer to 7 main timer . rtii ?real-time interrupt enable refer to 7 main timer . paovi ?pulse accumulator overflow interrupt enable 0 = paovf interrupts disabled 1 = interrupt requested when paovf is set to one paii ?pulse accumulator input edge interrupt enable 0 = paif interrupts disabled 1 = interrupt requested when paif is set to one bits [3:2] ?not implemented always read zero pr[1:0] ?timer prescaler select refer to 7 main timer . note bits in tmsk2 correspond bit for bit with flag bits in tflg2. ones in tmsk2 enable the corresponding interrupt sources. clear flags by writing a one to the corresponding bit position(s). tof ?timer overflow flag refer to 7 main timer . rtif ?real-time interrupt flag refer to 7 main timer . paovf ?pulse accumulator overflow flag set when pacnt changes from $ff to $00 paif ?pulse accumulator input edge flag set each time a selected active edge is detected on the pai input line bits [3:0] ?not implemented always read zero tmsk2 ?timer interrupt mask 2 $0024 bit 7 654321 bit 0 toi rtii paovi paii pr1 pr0 reset: 00000000 tflg2 ?timer interrupt flag 2 $0025 bit 7 654321 bit 0 tof rtif paovf paif reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 51 bit 7 ?not implemented always reads zero paen ?pulse accumulator system enable 0 = pulse accumulator disabled 1 = pulse accumulator enabled pamod ?pulse accumulator mode 0 = event counter 1 = gated time accumulation pedge ?pulse accumulator edge control bit 3 ?not implemented always reads zero i4/o5 ?input capture 4/output compare 5 refer to 7 main timer . rtr[1:0] ?real-time interrupt rate these two bits select the rate for periodic interrupts. refer to the following table. can be read and written, unaffected by reset. pactl ?pulse accumulator control $0026 bit 7 654321 bit 0 paen pamod pedge i4/o5 rtr1 rtr0 reset: 00000000 pamod pedge action on clock 0 0 pai falling edge increments the counter. 0 1 pai rising edge increments the counter. 1 0 a zero on pai inhibits counting. 1 1 a one on pai inhibits counting. table 11 real-time interrupt rates rtr[1:0] divide e into xtal = 4.0 mhz xtal = 8.0 mhz xtal = 12.0 mhz 0 0 2 13 8.19 ms 4.096 ms 2.731 ms 0 1 2 14 16.38 ms 8.192 ms 5.461 ms 1 0 2 15 32.77 ms 16.384 ms 10.923 ms 1 1 2 16 65.54 ms 32.768 ms 21.845 ms e = 1.0 mhz 2.0 mhz 3.0 mhz pacnt ?pulse accumulator counter $0027 bit 7 654321 bit 0 bit 7 654321 bit 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 52 mc68hc11c0ts/d 9 pulse-width modulation timer the mc68hc11c0 mcu contains a pwm timer that is composed of two 8-bit modulators. each of the modulators can create independent continuous waveforms with software-selectable duty rates from 0% to 100%. the pwm system provides up to two pulse-width modulated waveforms on port h pins. each channel has its own counter. the two counters can be concatenated to create a single 16-bit pwm output based on 16-bit counts. two clock sources (a and s) and a flexible clock select scheme give the pwm system a wide range of frequencies. four control registers configure the pwm outputs ?pwclk, pwpol, pwscal, and pwen. the pw- clk register selects the prescale value for the pwm clock sources and enables the 16-bit pwm func- tion. the pwpol register determines the polarity for each channel polarity and selects the clock source for each channel. the pwscal register derives a user-scaled clock based on the a-clock source. the pwen register enables the pwm channels. each channel has a separate 8-bit counter, period register, and duty cycle register. the period and duty cycle registers are double buffered so that if they are changed while the channel is enabled, the change does not take effect until the counter rolls over or the channel is disabled. a new period or duty cycle can be forced into effect immediately by writing to the period or duty cycle register and then writing to the counter. with a pwm channel configured for 8-bit mode and e equal to 2 mhz, frequencies can be produced from one-half the e clock rate to more than 8 seconds per cycle. by configuring the pwm output for 16- bit mode with e equal to 2 mhz, periods can be produced from one-half the e clock frequency to more than 35 minutes per cycle. in 16-bit mode, a pwm frequency of 60 hz corresponds to a duty cycle resolution of only 30 parts per million (0.0003%). in the same system, a pwm frequency of 1 khz corresponds to a duty cycle resolu- tion of 0.050%. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 53 figure 10 pulse width modulation system block diagram pwdty pwper pwm output ? 128 ? 1 ? 2 ? 4 ? 8 mcu e clock select pcka1 pcka2 pcka3 8-bit counter 8-bit compare = pwscal reset ? 2 clock a clock s pclk1 pclk2 pwen1 pwen2 con12 clock select bit 1 pwdty1 pwcnt1 pwcnt2 8-bit compare = pwdty2 pwper2 pwper1 16-bit pwm control con12 s r q carry reset bit 0 s r q mux ppol1 ppol2 ? 32 ? 64 cnt1 cnt2 q q clock a mux ? 16 ph0/ pw1 8-bit compare = 8-bit compare = 8-bit compare = ph1/ pw2 port h pin control reset 8 8 8 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 54 mc68hc11c0ts/d bit 7 ?not implemented always reads zero con12 ?concatenate channels one and two channel 1 is high order byte, and channel 2 is the low-order byte. the output appears on port h, bit 1. clock source is determined by pclk2. 0 = channels 1 and 2 are separate 8-bit pwms 1 = channels 1 and 2 are concatenated to create one 16-bit pwm channel. bits [5:3] ?not implemented always read zero pcka[3:1] ?prescaler for clock a determines the rate for clock a pwpol can be written anytime. if values in pwpol are changed during a pwm output, a stretched or truncated signal may be generated. bits [7:6] ?not implemented always read zero pclk2 ?pulse-width channel 2 clock select 0 = clock a is source 1 = clock s is source pclk1 ?pulse-width channel 1 clock select 0 = clock a is source 1 = clock s is source bits [3:2] ?not implemented always read zero pwclk ?pulse-width modulation clock select $0060 bit 7 654321 bit 0 con12 pcka3 pcka2 pcka1 reset: 00000000 pcka[3:1] value of clock a 0 0 0 e 0 0 1 e/2 0 1 0 e/4 0 1 1 e/8 1 0 0 e/16 1 0 1 e/32 1 1 0 e/64 1 1 1 e/128 pwpol ?pulse-width modulation timer polarity $0061 bit 7 654321 bit 0 pclk2 pclk1 ppol2 ppol1 reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 55 ppol[2:1] ?pulse-width channel x polarity 0 = pwm channel x output is low at the beginning of the clock cycle and goes high when duty count is reached 1 = pwm channel x output is high at the beginning of the clock cycle and goes low when duty count is reached scaled clock s is generated by dividing clock a by the value in pwscal, then dividing the result by 2. if pwscal = $00, divide clock a by 256, then divide the result by 2. tpwsl ?pwm scaled clock test bit (test) discp ?disable compare scaled e clock (test) bits [5:2] ?not implemented always read zero pwen[2:1] ?pulse-width channel 1? 0 = channel disabled 1 = channel enabled pwcnt1?wcnt2 begins count using the selected clock. a write to pwcntx registers causes them to reset to $00. pwper1?wper2 determines period of associated pwm channel period registers can be written any time. a new value written to a period register does not take effect until the counter resets and the new value is latched. users may begin the new period immediately by writing the new value to the period register, then writing any value to the counter. the counter will reset and the new period value will be latched. if the value in the period register is equal to or less than the value in the duty register, there will be no change in state. refer to 9.1 pwm boundary cases . pwscal ?pulse-width modulation timer prescaler $0062 bit 7 654321 bit 0 76543210 reset: 00000000 pwen ?pulse-width modulation timer enable $0063 bit 7 654321 bit 0 tpwsl discp pwen2 pwen1 reset: 00000000 tpwcnt1?wcnt2 ?pulse-width modulation timer counter 1 to 2 $0066?0067 $0066 bit 7 654321 bit 0 pwcnt1 $0067 bit 7 654321 bit 0 pwcnt2 reset: 00000000 pwper1?wper2 ?pulse-width modulation timer period 1 to 2 $006a?006b $006a bit 7 654321 bit 0 pwper1 $006b bit 7 654321 bit 0 pwper2 reset: 11111111 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 56 mc68hc11c0ts/d pwdty1?wdty2 determines duty cycle of associated pwm channel duty cycle registers can be written any time. a new value written to a duty register does not take effect until the counter resets and the new value is latched. users may begin the new duty cycle immediately by writing the new value to the duty register, then writing any value to the counter. the counter will reset and the new duty cycle value will be latched. if the value in the duty register is equal to or greater than the value in the period register, there will be no change in state. refer to 9.1 pwm boundary cases . 9.1 pwm boundary cases certain values written to pwm control registers, counters, etc. can cause outputs that are not what the user might expect. these are referred to as boundary cases. boundary cases occur when the user specifies a value that is either a maximum or a minimum. this value combined with other conditions causes unexpected behavior of the pwm system. the following conditions always cause the corresponding output to be high: pwdtyx = $00, pwperx > $00, and ppolx = 0 pwdtyx 3 pwperx, and ppolx = 1 pwperx = $00 and ppolx = 1 the following conditions always cause the corresponding output to be low: pwdtyx = $00, pwperx > $00, and ppolx = 1 pwdtyx 3 pwperx, and ppolx = 0 pwperx = $00 and ppolx = 0 pwdty1?wdty2 ?pulse-width modulation timer duty cycle 1 to 2 $006e?006f $006e bit 7 654321 bit 0 pwdty1 $006f bit 7 654321 bit 0 pwdty2 reset: 11111111 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 57 10 serial subsystems the mc68hc11c0 contains two serial communication subsystems that allow the mcu to transfer data to and from other devices. one system, the serial communications interface (sci), is an asynchronous nonreturn to zero (nrz) serial system that supports single-wire data transmissions. the second sys- tem, the serial peripheral interface (spi), is a synchronous master/slave system that allows data to be both transmitted and received simultaneously. as in other m68hc11 mcus, the serial systems are implemented as alternate functions of port d pins. however, the interrupt request lines found elsewhere on other m68hc11 mcus are now a third function of port d pins. therefore, two additional registers are associated with port d on the mc68hc11c0. the port d i/o control register (dioctl) and the port d output mode register (dodm) have been added. briefly, dioctl controls the function performed by each port d pin. the dodm register controls the output driver type for each port d pin. refer to the following descriptions of portd, ddrd, dioctl, and dodm registers. bits [7:6] ?not implemented always read zero ddd[5:0] ?data direction for port d 0 = input 1 = output bits [7:6] ?not implemented always read zero dio[5:2] ?port d i/o control for port d bits [5:2] refer to the following tables for description. bit 1 ?not implemented always reads zero dio0 ?port d i/o control for port d bit 0 refer to the following tables for description. portd ?port d data $0008 bit 7 654321 bit 0 pd5 pd4 pd3 pd2 pd1 pd0 reset: 0 0 iiiii i alt. pin func.: ?ss sck sdo/ mosi sdi/ miso txd rxd or: irq xirq ddrd ?data direction register for port d $0009 bit 7 654321 bit 0 ddd5 ddd4 ddd3 ddd2 ddd1 ddd0 reset: 00000000 dioctl ?port d i/o control $0007 bit 7 654321 bit 0 dio5 dio4 dio3 dio2 dio0 reset: 00111100 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 58 mc68hc11c0ts/d notes: 1. if a pin is configured for general-purpose i/o, the ddrd bit controls the direction of data. 2. if a pin is configured as ss , the mstr and ddrd bits are the output enable. 3. spe is the spi enable bit, mstr is the master/slave select bit. refer to the spcr register. 4. irq or ss inputs are internally pulled high if not used. this does not affect the pin. notes: 1. if a pin is configured for general-purpose i/o, the ddrd bit controls the direction of data. 2. if a pin is configured as mosi, the mstr and ddrd bit control the direction of data. 3. spe is the spi enable bit, mstr is the master/slave select bit. refer to the spcr register. notes: 1. if a pin is configured for general-purpose i/o, the ddrd bit controls the direction of data. 2. if a pin is configured as miso, the mstr and ddrd bit control the direction of data. 3. spe is the spi enable bit, mstr is the master/slave select bit. refer to the spcr register. 4. xirq or miso inputs are internally pulled high if not used. this does not affect the pin. table 12 pd5 configuration spi enable dioctl bit 5 dioctl bit 4 pd5 pull-up control output enable spe = 0 0 x i/o ddd5 ddd5 1 0 irq on off 1 1 i/o ddd5 ddd5 spe = 1 0 x i/o ddd5 ddd5 1 0 irq on off 11ss off mstr + ddd5 table 13 pd[4:3] configuration spi enable pd4 pd3 pull-up control output enable spe = 0 i/o i/o ddd[4:3] ddd[4:3] spe = 1 mosi sck off mstr + ddd[4:3] table 14 pd2 configuration spi enable dioctl bit 3 dioctl bit 2 pd2 pull-up control output enable spe = 0 0 x i/o ddd[3:2] ddd[3:2] 1 0 xirq on off 1 1 i/o ddd[3:2] ddd[3:2] spe = 1 0 x i/o ddd[3:2] ddd[3:2] 1 0 xirq on off 1 1 miso off mstr + ddd[3:2] f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 59 notes: 1. if a pin is configured for general-purpose i/o, the ddrd bit controls the direction of data. 2. if a pin is configured for rxd input, there is no weak pull-up at the pin. 3. if a pin is configured for txd output, the output can be either an open-drain output or a cmos driver. this is controlled by the port d driver output mode (dodm) register. 4. te is the transmitter enable bit. re is the receiver enable bit. refer to the sccr2 register. note if any of the pins pd[5:2] are configured as spi inputs they will not have pull-ups. if any of the pins pd[5:2] are configured as spi outputs they will be either open- drain outputs or normal cmos driver outputs depending on the state of the corre- sponding bit in the dodm register. each dodm bit controls an individual port d pin and is valid only if the pin is configured as an output. dod[6:0] ?port d open drain bits [6:0] 0 = corresponding port d output pin configured as normal cmos driver. 1 = corresponding port d output pin configured as open-drain output driver. 10.1 serial communications interface (sci) the sci is a universal asynchronous receiver transmitter (uart) serial communications interface, an independent serial i/o subsystem in the mc68hc11c0. it has a standard nrz format (one start bit, eight or nine data bits and one stop bit) and several baud rates available. the sci transmitter and re- ceiver are independent, but use the same data format and bit rate. refer to the two tables in the baud register description for a summary of the sci baud rate values. the mc68hc11c0 sci system supports single-wire transmit and receive operation. although sci sys- tems in other m68hc11 mcus support external wire-or operation, two pins are necessary to perform that function. the dio0 bit in dioctl register controls the sci mode of operation. when single-wire operation is selected (dio0 = 1), the sci uses only pd1 for its transmit and receive signals. in this mode, if the receiver is enabled, pd1 is the rxd input; if the transmitter is enabled, pd1 is the txd out- put. if both the receiver and the transmitter are enabled, both rxd and txd are internally tied together table 15 pd[1:0] configuration dioctl bit 0 sci enables pd1 pull-up control sci enables pd0 pull-up control sci mode 0 te = 1 txd off re = 1 rxd off two wire te = 0 i/o ddd1 re = 0 i/o ddd0 1 te = 1 txd off x i/o ddd0 single wire re = 0 te = 1 rxd off re = 0 te = 1 rxd/txd off re = 0 looped te = 1 i/o ddd1 re = 0 dodm ?port d open drain mode $0075 bit 7 654321 bit 0 dod6 dod5 dod4 dod3 dod2 dod1 dod0 reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 60 mc68hc11c0ts/d and share the pd1 pin. if an open-drain type driver is used for the txd output, rxd and txd can still be externally wire-or configured. the open-drain control in dioctl allows either full cmos driving or open-drain driving on the txd output. refer to the dioctl description. the sci system external pins are implemented as an alternate function of port d pins. in addition to the port d data direction register (ddrd), the port d i/o control register (dioctl) determines which func- tions are performed by port d pins. the port d open drain mode (dodm) register controls the driver type for each port d pin configured as an output. refer to the descriptions of portd, ddrd, dioctl, and dodm registers. the bits in three control registers and one status register control operation of the sci. the sci control registers (sccr1 and sccr2) are used to configure the sci and to enable certain features. the baud rate control register (baud) selects the sci prescaler and baud rate. bits in the sci status register (sc- sr) flag certain occurrences and control the sci system accordingly. if enabled by bits in sccr2, some sci status bits in scsr can generate interrupt requests. interrupt-generating flag bits in scsr are cleared automatically when the cpu services the sci request. refer to the descriptions of sccr1, sccr2, baud, and scsr. the sci data register (scdr) is comprised of two separate registers ?the receive data register and the transmit data register. when scdr is read, the receive data register is accessed. when scdr is written, the transmit data register is accessed. if nine-bit data format is used, r8 and t8 bits in sccr1 contain the ninth receive data bit and the ninth transmit data bit, respectively. both the transmit and re- ceive data registers are coupled to serial shift registers. when data to be transmitted is written to scdr the data is shifted from the transmit data register to the serial shift register in a parallel fashion. the contents of the shift register are then transmitted serially out the txd pin. when serial data is received on the rxd pin, it enters the serial shift register. when the shift register is full, the entire contents are shifted in parallel to the scdr register. the size of the shift register changes automatically according to the state of the m bit in sccr1. however, if nine-bit data is selected it is necessary to read or write the ninth data bit (r8 or t8) in sccr1 first to ensure that the contents of the shift register are correct. refer to the block diagrams for the sci receiver, sci transmitter, and baud rate generator. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 61 figure 11 sci receiver block diagram fe nf or idle rdrf tc tdre scsr1 sci status 1 sbk rwu re te ilie rie tcie tie sccr2 sci control 2 wake m t8 r8 wake-up logic rie or ilie idle sci tx requests sci interrupt request internal data bus pd0/ rxd scdr rx buffer stop (8)76543210 10 (11) - bit rx shift register (read-only) sccr1 sci control 1 rie rdrf start msb all ones data recovery ? 16 rwu re m disable driver receiver baud rate clock 8 8 8 pin buffer and control dio0 ddd0 dod0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 62 mc68hc11c0ts/d figure 12 sci transmitter block diagram fe nf or idle rdrf tc tdre scsr interrupt status sbk rwu re te ilie rie tcie tie sccr2 sci control 2 transmitter control logic tcie tc tie tdre sci rx requests sci interrupt request internal data bus pin buffer and control h(8)76543210l 10 (11) - bit tx shift register dio0 pd1/ txd scdr tx buffer transfer tx buffer shift enable jam enable preamble?am 1's break?am 0's (write-only) force pin direction (out) size 8/9 wake m t8 r8 sccr1 sci control 1 transmitter baud rate clock ddd1 dod1 8 8 8 8 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 63 figure 13 sci baud generator circuit diagram tclr ?clear baud rate counters tclr can only be set in test modes. 1 = clear baud rate counter chain for testing purposes. 0 = normal sci operation scp[1:0] ?sci baud rate prescaler selects shaded boxes contain the prescaler rates used in the following table. refer to the sci baud rate clock diagram. baud ?baud rate control register $002b bit 7 654321 bit 0 tclr scp1 scp0 rckb scr2 scr1 scr0 reset: 00000uuu sci baud generator ? 3 ? 4 ? 13 oscillator and clock generator ( ? 4) xtal extal e as internal bus clock (ph2) 1:1 scp[1:0] 1:0 0:1 0:0 ? 2 0:0:0 ? 2 0:0:1 ? 2 0:1:0 ? 2 0:1:1 ? 2 1:0:0 ? 2 1:0:1 ? 2 1:1:0 1:1:1 ? 16 sci receive baud rate (16x) scr[2:0] sci transmit baud rate (1x) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 64 mc68hc11c0ts/d rckb ?sci baud rate clock check rckb can only be set in test modes. 1 = exclusive-or of the rt clock driven out txd pin for testing purposes. 0 = normal sci operation scr2, scr1, and scr0 ?sci baud rate selects selects receiver and transmitter bit rate based on output from baud rate prescaler stage. shaded boxes in the table below contain the prescaler output rates shown in the preceding table. refer to the sci baud rate clock diagram. r8 ?receive data bit 8 when the m-bit is set, r8 stores the ninth data bit in the receive data character. r8 can also be used with 8-bit data to support several special receive data formats. r8 remains unchanged following a trans- mission and may be used again without rewriting it. t8 ?transmit data bit 8 when the m-bit is set, t8 stores the ninth data bit in the transmit data character. t8 can also be used with 8-bit data to support several special transmit data formats. t8 remains unchanged following a transmission and may be used again without rewriting it. bit 5 ?not implemented always reads zero crystal frequency in mhz scp[1:0] divide internal clock by 4.0 mhz (baud) 8.0 mhz (baud) 12.0 mhz (baud) 0 0 1 62.50 k 125.0 k 187.5 k 0 1 3 20.83 k 41.67 k 62.5 k 1 0 4 15.625 k 31.25 k 46.88 k 1 1 13 4800 k 9600 k 14.4 k divide prescaler by baud rate (prescaler output from previous table) scr[2:0] 4800 k 9600 k 14.4 k 0 0 0 1 4800 9600 14.4 0 0 1 2 2400 4800 7200 0 1 0 4 1200 2400 3600 0 1 1 8 600 1200 1800 1 0 0 16 300 600 1200 1 0 1 32 150 300 450 1 1 0 64 75 150 225 1 1 1 128 37.5 75 112.5 sccr1 ?sci control register 1 $002c bit 7 654321 bit 0 r8 t8 m wake reset: u u 000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 65 m ?mode (select character format) m selects either 8- or 9-bit data characters. format is one start bit, eight or nine data bits, and one stop bit. if 9-bit data is selected r8 and t8 store the ninth receive and transmit data bit, respectively. 0 = 8-bit data characters 1 = 9-bit data characters wake ?wakeup by address mark/idle 0 = wakeup by idle line recognition 1 = wakeup by address mark (most significant data bit set) bits [2:0] ?not implemented always read zero tie ?transmit interrupt enable 0 = tdre interrupts disabled 1 = sci interrupt requested when tdre status flag is set tcie ?transmit complete interrupt enable 0 = tc interrupts disabled 1 = sci interrupt requested when tc status flag is set rie ?receiver interrupt enable 0 = rdrf and or interrupts disabled 1 = sci interrupt requested when rdrf flag or the or status flag is set ilie ?idle line interrupt enable 0 = idle interrupts disabled 1 = sci interrupt requested when idle status flag is set te ?transmitter enable 0 = transmitter disabled 1 = transmitter enabled re ?receiver enable 0 = receiver disabled 1 = receiver enabled rwu ?receiver wakeup control 0 = normal sci receiver 1 = wakeup enabled and receiver interrupts inhibited sbk ?send break 0 = break generator off 1 = break codes generated as long as sbk = 1 sccr2 ?sci control register 2 $002d bit 7 654321 bit 0 tie tcie rie ilie te re rwu sbk reset: 00000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 66 mc68hc11c0ts/d tdre ?transmit data register empty flag this flag is set when scdr is empty. clear the tdre flag by reading scsr and then writing to scdr. 0 = scdr busy 1 = scdr empty tc ?transmit complete flag this flag is set when the transmitter is idle (no data, preamble, or break transmission in progress). clear the tc flag by reading scsr and then writing to scdr. 0 = transmitter busy 1 = transmitter idle rdrf ?receive data register full flag rdrf is set if a received character is ready to be read from scdr. clear the rdrf flag by reading scsr and then reading scdr. 0 = scdr empty 1 = scdr full idle ?idle line detected flag this flag is set if the rxd line is idle. once cleared, idle is not set again until the rxd line has been active and becomes idle again. the idle flag is inhibited when rwu = 1. clear idle by reading scsr and then reading scdr. 0 = rxd line is active 1 = rxd line is idle or ?overrun error flag or is set if a new character is received before a previously received character is read from scdr. clear the or flag by reading scsr and then reading scdr. 0 = no overrun 1 = overrun detected nf ?noise error flag nf is set if majority sample logic detects anything other than a unanimous decision. clear nf by reading scsr and then reading scdr. 0 = unanimous decision 1 = noise detected fe ?framing error fe is set when a zero is detected where a stop bit was expected. clear the fe flag by reading scsr and then reading scdr. 0 = stop bit detected 1 = zero detected bit 0 ?not implemented always reads zero scsr ?sci status register $002e bit 7 654321 bit 0 tdre tc rdrf idle or nf fe reset: 11000000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 67 receive and transmit are double buffered. reads access the receive data buffer, and writes access the transmit data buffer. when the m bit in sccr1 is set, r8 and t8 in sccr1 store the ninth bit in receive and transmit data characters. 10.2 serial peripheral interface (spi) the spi allows the mcu to communicate synchronously with peripheral devices and other micropro- cessors. when configured as a master, data transfer rates can be as high as one-half the e clock rate (1 mbit per second for a 2 mhz bus frequency). when configured as a slave, data transfers can be as fast as the e clock rate (2 mbit per second for a 2 mhz bus frequency). during an spi transfer, data is simultaneously transmitted and received. a serial clock line synchronizes shifting and sampling of the information on the two serial data lines. a slave select line allows individual selection of a slave spi device; slave devices that are not selected do not interfere with spi bus activ- ities. on a master spi device, the select line can optionally be used to indicate a multiple master bus contention. the central element in the spi system is the block containing the shift register and the read data buffer. the system is single buffered in the transmit direction and double buffered in the receive direction. this means that new data for transmission cannot be written to the shifter until the previous transfer is com- plete; however, received data is transferred into a parallel read data buffer so the shifter is free to accept a second serial character. as long as the first character is read out of the read data buffer before the next serial character is ready to be transferred, no overrun condition occurs. a single mcu register ad- dress is used for reading data from the read data buffer and for writing data to the shifter. refer to the spi block diagram. software can select one of four combinations of serial clock phase and polarity using two bits in the spi control register (spcr). the clock polarity is specified by the cpol control bit, which selects an active high or active low clock, and has no significant effect on the transfer format. the clock phase (cpha) control bit selects one of two different transfer formats. the spi system external pins are implemented as an alternate function of port d pins. in addition to the port d data direction register (ddrd), the port d i/o control register (dioctl) determines which func- tions are performed by port d pins. the port d open drain mode (dodm) register controls the driver type for each port d pin configured as an output. refer to the descriptions of portd, ddrd, dioctl, and dodm registers. scdr ?sci data register $002f bit 7 654321 bit 0 r7/t7 r6/t6 r5/t5 r4/t4 r3/t3 r2/t2 r1/t1 r0/t0 reset: uuuuuuuu f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 68 mc68hc11c0ts/d figure 14 spi block diagram spie ?serial peripheral interrupt enable 0 = spi interrupts disabled 1 = spi interrupts enabled spe ?serial peripheral system enable 0 = spi off 1 = spi on spcr ?serial peripheral control register $0028 bit 7 654321 bit 0 spie spe mstr cpol cpha spr1 spr0 reset: 000001uu internal mcu clock divider ? 2 ? 4 ? 16 ? 32 select spi clock (master) 8-bit shift register read data buffer clock clock logic s m m s pin control logic miso/ pd2 mosi/ pd3 sck/ pd4 ss / pd5 m s mstr spe dio[5:2] spr1 spr0 mstr spe spie spie spe mstr cpha cpol spr1 spr0 spcr spi control register spif wcol modf spsr spi status register spi control internal data bus spi interrupt request dod[5:2] dio4 dio3 dio2 dio1 dio0 port d i/o control dio5 dod4 dod3 dod2 dod1 dod0 port d output mode dod5 8 8 4 4 8 msb lsb f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 69 bit 5 ?not implemented always reads zero mstr ?master mode select 0 = slave mode 1 = master mode cpol, cpha ?clock polarity, clock phase refer to figure 15 . figure 15 spi transfer format spr[1:0] ?spi clock rate selects table 16 spi clock rate selects spr[1:0] divide e clock by spi baud rate at e = 1 mhz spi baud rate at e = 2 mhz spi baud rate at e = 3 mhz 0 0 2 500 khz 1.0 mhz 1.5 mhz 0 1 4 250 khz 500 khz 750 khz 1 0 16 125 khz 125 khz 375 khz 1 1 32 62.5 khz 62.5 khz 187.5 khz spi transfer format 1 2345678 1 sck (cpol = 1) sck (cpol = 0) sck cycle # ss (to slave) 654321 lsb msb msb654321lsb 1 2 3 5 4 slave cpha=1 transfer in progress master transfer in progress slave cpha=0 transfer in progress 1. ss asserted 2. master writes to spdr 3. first sck edge 4. spif set 5. ss negated sample input data out (cpha = 0) sample input data out (cpha = 1) f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 70 mc68hc11c0ts/d spif ?spi transfer complete flag this flag is set when an spi transfer is complete (after eight sck cycles in a data transfer). clear this flag by reading spsr, then access spdr. 0 = no spi transfer complete or spi transfer still in progress 1 = spi transfer complete wcol ?write collision error flag this flag is set if the mcu tries to write data into spdr while an spi data transfer is in progress. clear this flag by reading spsr, then access spdr. 0 = no write collision error 1 = spdr written while spi transfer in progress bit 5 ?not implemented always reads zero modf ?mode fault (mode fault terminates spi operation) set when ss is pulled low while mstr = 1. cleared by spsr read followed by spcr write. 0 = no mode fault error 1 = ss pulled low in master mode bits [3:0] ?not implemented always read zero spi is double buffered in, single buffered out. spsr ?serial peripheral status register $0029 bit 7 654321 bit 0 spif wcol modf reset: 00000000 spdr ?spi data register $002a bit 7 654321 bit 0 bit 7 654321 bit 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 71 11 analog-to-digital converter the analog-to-digital (a/d) converter system uses an all-capacitive charge-redistribution technique to convert analog signals to digital values. the mc68hc11c0 a/d converter system, a four-channel mul- tiplexed-input successive-approximation converter, is accurate to 1 least significant bit (lsb). it does not require external sample and hold circuits because of the type of charge-redistribution technique used. dedicated pins v rh and v rl provide the reference supply voltage inputs. a multiplexer allows the single a/d converter to select one of 16 analog signals. figure 16 a/d converter block diagram pe0/ an0 pe1/ an1 pe2/ an2 pe3/ an3 analog mux 8-bit capacitive dac with sample and hold successive approximation register and control adctl a/d control cb cc cd mult scan ccf ca addr 3 a/d result 3 result register interface result internal data bus v rh v rl addr 4 a/d result 4 addr 2 a/d result 2 addr 1 a/d result 1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 72 mc68hc11c0ts/d figure 17 timing diagram for a sequence of four a/d conversions figure 18 electrical model of an analog input pin (sample mode) msb 4 cycles e clock write bit 6 2 cyc bit 5 2 cyc bit 4 2 cyc bit 3 2 cyc bit 2 2 cyc bit 1 2 cyc lsb 2 cyc end 12 e cycles sample analog input successive approximation sequence 2 cyc convert fourth channel and update addr4 convert third channel and update addr3 convert second channel and update addr2 convert first channel and update addr1 set repeat e cycles 128 96 64 32 0 to adctl sequence if scan = 1 ccf flag dac capacitance v rl analog input pin ~ 20 pf + ~ 20 v ? ~ 0.7 v < 2 pf input protection device 400 na junction leakage diffusion and poly coupler 4 k w * this analog switch is closed only during the 12-cycle sample time. * f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 73 ccf ?conversions complete flag set after an a/d conversion cycle cleared when adctl is written bit 6 ?not implemented always reads zero scan ?continuous scan control 0 = perform four conversions and stop 1 = convert the four channels and continuously update result registers. mult ?multiple channel/single channel control 0 = convert single channel selected 1 = convert four channels simultaneously cd?a ?channel select d through a *used for factory testing adctl ?a/d control/status $0030 bit 7 654321 bit 0 ccf scan mult cd cc cb ca reset: i 0 iiiiii table 17 a/d converter channel assignments channel select control bits channel signal result in adrx if mult = 1 result in adrx if mult = 0 cd cc cb ca 0 0 0 0 ad0 adr1 adr[4:1] 0 0 0 1 ad1 adr2 adr[4:1] 0 0 1 0 ad2 adr3 adr[4:1] 0 0 1 1 ad3 adr4 adr[4:1] 0 1 0 0 reserved 0 1 0 1 reserved 0 1 1 0 reserved 0 1 1 1 reserved 1 0 0 0 reserved 1 0 0 1 reserved 1 0 1 0 reserved 1 0 1 1 reserved 1 100 v rh * adr1 adr[4:1] 1 101 v rl * adr2 adr[4:1] 1 110 (v rh )/2* adr3 adr[4:1] 1 1 1 1 test/reserved* adr4 adr[4:1] f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola mc68hc11c0 74 mc68hc11c0ts/d (1) % of v rh ? rl (2) volts for v rl = 0; v rh = 5.0 v * can be written only once in first 64 cycles out of reset in normal modes, any time in special modes. adpu ?a/d converter power-up 0 = a/d converter powered down 1 = a/d converter powered up csel ?clock select 0 = a/d converter uses system e clock 1 = a/d converter use internal rc clock irqe ?irq select edge sensitive only refer to 6 resets and interrupts . dly ?enable oscillator start-up delay on exit from stop refer to 6 resets and interrupts . cme ?clock monitor enable refer to 6 resets and interrupts . bit 2 ?not implemented always reads zero cr[1:0] ?cop timer rate select refer to 7 main timer . adr1?dr4 ?a/d results $0031?0034 $0031 bit 7 654321 bit 0 adr1 $0032 bit 7 654321 bit 0 adr2 $0033 bit 7 654321 bit 0 adr3 $0034 bit 7 654321 bit 0 adr4 table 18 analog input to 8-bit result translation table bit 7 654321 bit 0 % (1) 50% 25% 12.5% 6.25% 3.12% 1.56% 0.78% 0.39% volts (2) 2.500 1.250 0.625 0.3125 0.1562 0.0781 0.0391 0.0195 adctl ?a/d control/status $0030 bit 7 654321 bit 0 adpu csel irqe* dly* cme cr1* cr0* reset: 00010000 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
mc68hc11c0 motorola mc68hc11c0ts/d 75 notes f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola reserves the right to make changes without further notice to any products herein. motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. ?ypical?parameters can and do vary in different applications. all operating parameters, including ?ypicals?must be validated for each customer application by customer? technical experts. motorola does not convey any license under its patent rights nor the rights of others. motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the motorola product could create a situation where personal injury or death may occur. should buyer purchase or use motorola products for any such unintended or unauthorized application, buyer shall indemnify and hold motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that motorola was negligent regarding the design or manufacture of the part. motorola and b are registered trademarks of motorola, inc. motorola, inc. is an equal opportunity/affirmative action employer. how to reach us: usa/europe: motorola literature distribution; p.o. box 20912; phoenix, arizona 85036. 1-800-441-2447 mfax: rmfax0@email.sps.mot.com - touchtone (602) 244-6609 internet: http://design-net.com japan: nippon motorola ltd.; tatsumi-spd-jldc, toshikatsu otsuki, 6f seibu-butsuryu-center, 3-14-2 tatsumi koto-ku, tokyo 135, japan. 03-3521-8315 hong kong: motorola semiconductors h.k. ltd.; 8b tai ping industrial park, 51 ting kok road, tai po, n.t., hong kong. 852-26629298 m f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .


▲Up To Search▲   

 
Price & Availability of MC68HC11C0MFN2

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X